| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #pragma once
- #include <Critical.h>
- #include <Either.h>
- #include <Model3D.h>
- #include "Area.h"
- #include "EntityType.h"
- #include "FactoryCraftModel.h"
- class Block;
- struct MovementFrame
- {
- Framework::Vec3<float> position;
- float rotation;
- float duration;
- };
- class Entity : public FactoryCraftModel
- {
- private:
- int id;
- const EntityType* zType;
- bool playerControlled;
- Framework::Critical cs;
- MovementFrame currentFrame;
- Framework::Array<MovementFrame> frames;
- double frameLength;
- public:
- Entity(const EntityType* zType,
- Framework::Model3DData* model,
- Framework::Model3DTextur* texture,
- int id,
- Framework::Vec3<float> position,
- float size);
- ~Entity();
- void api(char* message);
- bool tick(double time) override;
- int getId() const;
- const EntityType* zEntityType() const;
- void lock();
- void unlock();
- void setPlayerControlled();
- };
|