diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-26 07:43:32 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-26 07:43:32 -0400 |
commit | 52de6c2e6c048b84a7665b6fc583b2259bbdd3af (patch) | |
tree | fd42df62429b5e7e18d2a04a23e4bc5615f2097a /include/player.hpp | |
parent | 8eb1625aea5ccaa07414e699e784440a94277ab0 (diff) |
player stuff
Diffstat (limited to 'include/player.hpp')
-rw-r--r-- | include/player.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/player.hpp b/include/player.hpp index 6bad917..e196fa4 100644 --- a/include/player.hpp +++ b/include/player.hpp @@ -10,7 +10,7 @@ constexpr const float PLAYER_SPEED_CONSTANT = 0.15f; class PlayerSystem : public entityx::System<PlayerSystem>, public entityx::Receiver<PlayerSystem> { private: - entityx::Entity::Id pid; + entityx::Entity player; bool moveLeft; bool moveRight; @@ -21,6 +21,8 @@ public: PlayerSystem(void) : moveLeft(false), moveRight(false), speed(1.0f) {} + void create(void); + void configure(entityx::EventManager&); void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; @@ -28,9 +30,6 @@ public: void receive(const KeyUpEvent&); void receive(const KeyDownEvent&); - inline void setPlayer(const entityx::Entity& e) - { pid = e.id(); } - vec2 getPosition(void) const; }; |