aboutsummaryrefslogtreecommitdiffstats
path: root/include/player.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-10-27 20:50:29 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-10-27 20:50:29 -0400
commit816bedbd011b6729e8be0a4b40213f48fd9d73ca (patch)
treeb42d7dc277c415db4b826182ecd26b10b714697e /include/player.hpp
parent0fa2320e978926db6781a2bdcdf5a9b6f0317e93 (diff)
names, jumping
Diffstat (limited to 'include/player.hpp')
-rw-r--r--include/player.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/player.hpp b/include/player.hpp
index e196fa4..187e77e 100644
--- a/include/player.hpp
+++ b/include/player.hpp
@@ -4,6 +4,7 @@
#include <entityx/entityx.h>
#include <events.hpp>
+#include <components.hpp>
#include <common.hpp>
constexpr const float PLAYER_SPEED_CONSTANT = 0.15f;
@@ -31,6 +32,8 @@ public:
void receive(const KeyDownEvent&);
vec2 getPosition(void) const;
+ inline void setX(const float& x)
+ { player.component<Position>().get()->x = x; }
};
#endif // PLAYER_HPP_