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.

Item.h 385B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <string>
  3. #include "Resource.h"
  4. #include "Tile.h"
  5. namespace Swan {
  6. class Item {
  7. public:
  8. struct Builder {
  9. std::string name;
  10. std::string image;
  11. int maxStack = 64;
  12. };
  13. const Tile::ID id;
  14. const std::string name;
  15. const int maxStack;
  16. Item(Tile::ID id, std::string name, const Builder &builder):
  17. id(id), name(name), maxStack(builder.maxStack) {}
  18. };
  19. }