#pragma once #include #include "BlockType.h" #include "Registries.h" #include "Area.h" using namespace Framework; class BasicBlockItemType; class Chunk; class Block : public Model3D { protected: bool transparent; float hp; float maxHP; const BlockType* zType; bool sideVisible[6]; Vec3 location; Framework::Textur* breakTextur; public: Block(const BlockType* zType, Vec3 position, Model3DData* model, Model3DTextur* texture, int maxHp); virtual ~Block(); void api(char* message); bool isTransparent() const; void setSideVisible(Direction dir, bool visible); Vec3 getLocation() const; const BlockType* zBlockType() const; Textur* zEffectTextur() override; float getEffectPercentage() override; friend Chunk; };