Player.h 735 B

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