123456789101112131415161718192021222324252627282930313233343536 |
- #pragma once
- #include <Vec3.h>
- #include <Array.h>
- #include <Writer.h>
- #include "StaticRegistry.h"
- #include "Block.h"
- class Game;
- class Item;
- class Block;
- class BlockType : public virtual Framework::ReferenceCounter
- {
- private:
- const int id;
- protected:
- BlockType( int id );
- virtual void loadSuperBlock( Block *zBlock, Framework::Reader *zReader );
- virtual void saveSuperBlock( Block *zBlock, Framework::Writer *zWriter );
- virtual void createSuperBlock( Block *zBlock, Item *zItem );
- virtual void createSuperItem( Block *zBlock, Item *zItem );
- virtual Block *createBlock( Framework::Vec3<int> position, Game *zTarget ) = 0;
- virtual Item *createItem( Game *zTarget ) = 0;
- public:
- virtual Block *loadBlock( Framework::Vec3<int> position, Game *zTarget, Framework::Reader *zReader );
- virtual void saveBlock( Block *zBlock, Framework::Writer *zWriter );
- virtual Item *getItemFromBlock( Block *zBlock, Game *zTarget );
- virtual Block *createBlockAt( Framework::Vec3<int> position, Game *zTarget, Item *zUsedItem );
- int getId() const;
- };
|