12345678910111213141516171819202122232425262728293031323334353637 |
- #include "BlockType.h"
- #include "Block.h"
- #include "Registries.h"
- using namespace Framework;
- BlockType::BlockType(
- int id, bool needsInstance, ModelInfo model, int initialMaxHP)
- : ReferenceCounter(),
- id(id),
- needsInstance(needsInstance),
- model(model),
- initialMaxHP(initialMaxHP)
- {}
- BlockType::~BlockType() {}
- Block* BlockType::createBlock(Framework::Vec3<int> position)
- {
- return new Block(this,
- position,
- model.getModel(),
- model.getTexture(),
- initialMaxHP,
- model.isTransparent());
- }
- int BlockType::getId() const
- {
- return id;
- }
- bool BlockType::doesNeedInstance() const
- {
- return needsInstance;
- }
|