Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #pragma once
  2. #include "Tile.h"
  3. #include "FileManager.h"
  4. #include <string>
  5. #include <algorithm>
  6.  
  7. class Layer
  8. {
  9. public:
  10.     Layer();
  11.     ~Layer();
  12.  
  13.     void LoadContent(std::string layerID, std::string mapID, SDL_Renderer *renderer);
  14.     void UnloadContent();
  15.     void Update(Player &player);
  16.     void Draw(SDL_Renderer *renderer);
  17. private:
  18.  
  19.     Texture tileSheet;
  20.     FileManager file;
  21.  
  22.     Tile tile;
  23.  
  24.     SDL_Rect imageRect;
  25.  
  26.     std::vector<std::vector<std::string>> attributes;
  27.     std::vector<std::vector<std::string>> contents;
  28.  
  29.     std::vector<std::pair<int, int>> solidTiles;
  30.     std::vector<Tile> tiles;
  31.  
  32.     std::pair<int,int> SetTiles(std::string tileString);
  33.  
  34.     float posX;
  35.     float posY;
  36. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement