12345678910111213141516171819202122232425262728293031323334 |
- #pragma once
- #include <Reader.h>
- #include <ReferenceCounter.h>
- #include <Writer.h>
- #include <Vec3.h>
- #include "StaticRegistry.h"
- #include "ModelInfo.h"
- class Entity;
- 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;
- virtual Entity* createEntity(Framework::Vec3<float> position, int dimensionId, int entityId) const = 0;
- 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;
- int getId() const;
- const ModelInfo& getModel() const;
- };
|