BlockType.h 695 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <Reader.h>
  3. #include <ReferenceCounter.h>
  4. #include <Vec3.h>
  5. #include "ModelInfo.h"
  6. #include "StaticRegistry.h"
  7. class Block;
  8. class BlockType : public virtual Framework::ReferenceCounter
  9. {
  10. private:
  11. const int id;
  12. bool needsInstance;
  13. int initialMaxHP;
  14. bool needModelSubscription;
  15. ModelInfo model;
  16. public:
  17. BlockType(int id,
  18. bool needsInstance,
  19. ModelInfo model,
  20. int initialMaxHP,
  21. bool needModelSubscription);
  22. ~BlockType();
  23. Block* createBlock(Framework::Vec3<int> position);
  24. bool doesNeedInstance() const;
  25. bool doesNeedModelSubscription() const;
  26. int getId() const;
  27. };