Player.h 823 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "Entity.h"
  3. #include "EntityType.h"
  4. class PlayerEntityType;
  5. class Player : public Entity
  6. {
  7. private:
  8. Framework::Text name;
  9. public:
  10. Player( Framework::Vec3<float> location, int dimensionId );
  11. void setName( Framework::Text name );
  12. const char *getName() const;
  13. friend PlayerEntityType;
  14. };
  15. class PlayerEntityType : public EntityType
  16. {
  17. REGISTRABLE( PlayerEntityType )
  18. protected:
  19. virtual void loadSuperEntity( Entity *zEntity, Framework::StreamReader *zReader ) const override;
  20. virtual void saveSuperEntity( Entity *zEntity, Framework::StreamWriter *zWriter ) const override;
  21. public:
  22. PlayerEntityType();
  23. virtual Entity *createEntity( Framework::Vec3<float> position, int dimensionId, Game *zTarget ) const override;
  24. };
  25. REGISTER( PlayerEntityType, EntityType )