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.

Tile.cc 490B

12345678910111213141516171819202122232425
  1. #include "Tile.h"
  2. #include "common.h"
  3. #include <Game.h>
  4. namespace Swan {
  5. Tile::ID Tile::INVALID_ID = 0;
  6. std::unique_ptr<Tile> Tile::createInvalid(const ResourceManager &resources) {
  7. return std::make_unique<Tile>(resources, Builder{
  8. .name = "@::invalid",
  9. .image = "@::invalid",
  10. });
  11. }
  12. std::unique_ptr<Tile> Tile::createAir(const ResourceManager &resources) {
  13. return std::make_unique<Tile>(resources, Builder{
  14. .name = "@::air",
  15. .image = "@::air",
  16. .isSolid = false,
  17. });
  18. }
  19. }