Entity.cpp 562 B

12345678910111213141516171819202122232425262728293031
  1. #include "Entity.h"
  2. Entity::Entity( const EntityType* zType, bool hasInventory )
  3. : Model3D(), Inventory( { 0.f, 0.f, 0.f }, hasInventory ), zEntityType( zType )
  4. {}
  5. Entity::~Entity()
  6. {}
  7. bool Entity::tick( double time )
  8. {
  9. setPosition( location );
  10. // TODO: calculate rotation based on faceDir
  11. return Model3D::tick( time );
  12. }
  13. int Entity::getId() const
  14. {
  15. return id;
  16. }
  17. const EntityType* Entity::zType() const
  18. {
  19. return zEntityType;
  20. }
  21. int Entity::getCurrentDimension() const
  22. {
  23. return currentDimensionId;
  24. }