diff options
Diffstat (limited to 'include/player.hpp')
-rw-r--r-- | include/player.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/player.hpp b/include/player.hpp index 187e77e..59d6368 100644 --- a/include/player.hpp +++ b/include/player.hpp @@ -4,6 +4,7 @@ #include <entityx/entityx.h> #include <events.hpp> +#include <engine.hpp> #include <components.hpp> #include <common.hpp> @@ -34,6 +35,8 @@ public: vec2 getPosition(void) const; inline void setX(const float& x) { player.component<Position>().get()->x = x; } + inline float getWidth(void) const + { return game::entities.component<Solid>(player.id())->width; } }; #endif // PLAYER_HPP_ |