123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #include "Entity.h"
- Entity::Entity( const EntityType *zType, Framework::Vec3<float> location, int dimensionId, int entityId )
- : Inventory( location, true ),
- speed( 0, 0, 0 ),
- faceDir( 1, 0 ),
- zEntityType( zType ),
- currentDimensionId( dimensionId ),
- removed( 0 ),
- id( entityId )
- {}
- void Entity::onDeath()
- {}
- void Entity::tick( const Dimension *zDimension, Game *zGame )
- {
- // TODO
- }
- void Entity::api( Framework::StreamReader *zRequest, NetworkResponse *zResponse )
- {
- // TODO: answer api requests
- }
- void Entity::setPosition( Framework::Vec3<float> pos )
- {
- location = pos;
- }
- float Entity::getMaxHP() const
- {
- return maxHP;
- }
- float Entity::getCurrentHP() const
- {
- return currentHP;
- }
- float Entity::getStamina() const
- {
- return stamina;
- }
- float Entity::getMaxStamina() const
- {
- return maxStamina;
- }
- float Entity::getHunger() const
- {
- return hunger;
- }
- float Entity::getMaxHunger() const
- {
- return maxHunger;
- }
- float Entity::getThirst() const
- {
- return thirst;
- }
- float Entity::getMaxThirst() const
- {
- return maxThirst;
- }
- Framework::Vec3<float> Entity::getSpeed() const
- {
- return speed;
- }
- Framework::Vec2<float> Entity::getFaceDir() const
- {
- return faceDir;
- }
- Framework::Vec3<float> Entity::getPosition() const
- {
- return location;
- }
- int Entity::getCurrentDimensionId() const
- {
- return currentDimensionId;
- }
- bool Entity::isRemoved() const
- {
- return removed;
- }
- const EntityType *Entity::zType() const
- {
- return zEntityType;
- }
- int Entity::getId() const
- {
- return id;
- }
|