1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #pragma once
- #include <Reader.h>
- #include <ReferenceCounter.h>
- #include <Writer.h>
- #include <Vec3.h>
- #include "StaticRegistry.h"
- #include "ModelInfo.h"
- class Entity;
- class EntityTypeEnum
- {
- public:
- static const int PLAYER = 0;
- static const int ITEM = 1;
- };
- class EntityType : public virtual Framework::ReferenceCounter
- {
- private:
- const int id;
- const ModelInfo model;
- protected:
- EntityType(int id, ModelInfo model);
- 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 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;
- const ModelInfo& getModel() const;
- };
|