12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include <Vec2.h>
- #include "Effect.h"
- #include "Inventory.h"
- #include "NetworkResponse.h"
- class EntityType;
- class Dimension;
- class Game;
- class Entity : public Inventory
- {
- protected:
- float maxHP;
- float currentHP;
- float stamina;
- float maxStamina;
- float hunger;
- float maxHunger;
- float thirst;
- float maxThirst;
- Framework::Vec3<float> speed;
- Framework::Vec2<float> faceDir;
- const EntityType *zEntityType;
- int currentDimensionId;
- bool removed;
- int id;
- virtual void onDeath();
- Entity( const EntityType *zType, Framework::Vec3<float> location, int dimensionId, int entityId );
- public:
- virtual void tick( const Dimension *zDimension, Game *zGame );
- virtual void api( Framework::StreamReader *zRequest, NetworkResponse *zResponse );
- void setPosition( Framework::Vec3<float> pos );
- float getMaxHP() const;
- float getCurrentHP() const;
- float getStamina() const;
- float getMaxStamina() const;
- float getHunger() const;
- float getMaxHunger() const;
- float getThirst() const;
- float getMaxThirst() const;
- Framework::Vec3<float> getSpeed() const;
- Framework::Vec2<float> getFaceDir() const;
- Framework::Vec3<float> getPosition() const;
- int getCurrentDimensionId() const;
- bool isRemoved() const;
- const EntityType *zType() const;
- int getId() const;
- friend Effect;
- friend EntityType;
- };
|