A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Game.h 523B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include <vector>
  3. #include <map>
  4. #include <string>
  5. #include "common.h"
  6. #include "WorldPlane.h"
  7. #include "Player.h"
  8. #include "Tile.h"
  9. namespace Swan {
  10. class Game {
  11. public:
  12. Player *player_;
  13. WorldPlane *current_plane_;
  14. std::vector<WorldPlane *> planes_;
  15. std::vector<Tile> registered_tiles_;
  16. std::map<std::string, Tile::TileID> tile_id_map_;
  17. void registerTile(std::string &name, Tile &tile);
  18. Tile::TileID getTileID(std::string &name);
  19. void draw(Win &win);
  20. void update(float dt);
  21. void tick();
  22. };
  23. }