Player.h 651 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <Text.h>
  3. #include "Entity.h"
  4. #include "StaticRegistry.h"
  5. class ItemSlot;
  6. class Player : public Entity
  7. {
  8. private:
  9. Framework::Text name;
  10. Framework::Array<ItemSlot*> itemBar;
  11. public:
  12. Player();
  13. ~Player();
  14. virtual bool tick( double time ) override;
  15. };
  16. class PlayerEntityType : public EntityType
  17. {
  18. REGISTRABLE( PlayerEntityType )
  19. protected:
  20. virtual void loadSuperEntity( Entity* zEntity, Framework::StreamReader* zReader ) const override;
  21. virtual Entity* createEntity() const override;
  22. public:
  23. PlayerEntityType();
  24. };
  25. REGISTER( PlayerEntityType, EntityType )