BlockType.h 526 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <Reader.h>
  3. #include <ReferenceCounter.h>
  4. #include <Vec3.h>
  5. #include "StaticRegistry.h"
  6. #include "ModelInfo.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. ModelInfo model;
  15. public:
  16. BlockType(int id, bool needsInstance, ModelInfo model, int initialMaxHP);
  17. ~BlockType();
  18. Block* createBlock(Framework::Vec3<int> position);
  19. bool doesNeedInstance() const;
  20. int getId() const;
  21. };