12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #pragma once
- #include <Reader.h>
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include <Writer.h>
- #include "ModelInfo.h"
- class Entity;
- class Game;
- class EntityTypeEnum
- {
- public:
- static const int PLAYER = 0;
- static const int ITEM = 1;
- };
- class EntityType : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::Text name;
- int id;
- ModelInfo *model;
- protected:
- EntityType(Framework::Text name, ModelInfo* model);
- ~EntityType();
- virtual void loadSuperEntity(
- Entity* zEntity, Framework::StreamReader* zReader) const;
- virtual void saveSuperEntity(
- Entity* zEntity, Framework::StreamWriter* zWriter) const;
- virtual void createSuperEntity(Entity* zEntity) const;
- public:
- virtual bool initialize(Game *zGame);
- virtual Entity* loadEntity(Framework::StreamReader* zReader) const;
- virtual void saveEntity(
- Entity* zEntity, Framework::StreamWriter* zWriter) const;
- virtual Entity* createEntityAt(
- Framework::Vec3<float> position, int dimensionId) const;
- virtual Entity* createEntity(Framework::Vec3<float> position,
- int dimensionId,
- int entityId) const = 0;
- int getId() const;
- ModelInfo* zModel() const;
- void setTypeId(int id);
- Framework::Text getName() const;
- };
|