12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #include "Entity.h"
- Entity::Entity( const EntityType *zType, Framework::Vec3<float> location, int dimensionId, int entityId )
- : Inventory( location ),
- 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::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;
- }
|