1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #include "Block.h"
- #include "BlockType.h"
- #include "Item.h"
- class BlockType;
- class ItemType;
- class DirtBlockType;
- class DirtBlockItemType;
- class BasicBlock : public Block
- {
- public:
- BasicBlock( BlockType* zType, ItemType* zTool, Framework::Vec3<int> pos );
- virtual bool onTick( TickQueue* zQueue, int numTicks, bool& blocked ) override;
- virtual void onPostTick() override;
- friend DirtBlockType;
- };
- class DirtBlockType : public BlockType
- {
- REGISTRABLE( DirtBlockType )
- protected:
- virtual void loadSuperBlock( Block* zBlock, Framework::StreamReader* zReader ) override;
- virtual void saveSuperBlock( Block* zBlock, Framework::StreamWriter* zWriter ) override;
- virtual void createSuperBlock( Block* zBlock, Item* zItem ) override;
- virtual void createSuperItem( Block* zBlock, Item* zItem ) override;
- virtual Block* createBlock( Framework::Vec3<int> position, Game* zTarget ) override;
- virtual Item* createItem( Game* zTarget ) override;
- DirtBlockType();
- };
- REGISTER( DirtBlockType, BlockType )
- class DirtBlockItemType : public BasicBlockItemType
- {
- REGISTRABLE( DirtBlockItemType )
- protected:
- DirtBlockItemType();
- public:
- virtual Item* createItem() const override;
- };
- REGISTER( DirtBlockItemType, ItemType )
|