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 363B

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