A 2D tile-based sandbox game.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Tile.h 424B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string>
  4. #include <SFML/Graphics/Image.hpp>
  5. namespace Swan {
  6. class Tile {
  7. public:
  8. using ID = uint16_t;
  9. Tile(std::string path): path_(path) {}
  10. Tile *solid(bool b) { is_solid_ = b; return this; }
  11. static sf::Image invalid_image;
  12. static Tile invalid_tile;
  13. static void initInvalid();
  14. bool is_solid_ = true;
  15. std::string path_;
  16. std::string name_;
  17. sf::Image image_;
  18. };
  19. }