From 149f255760e56447400d80532c99d481bc93644a Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 22 Oct 2016 18:40:40 -0400 Subject: working linking, left/right --- include/player.hpp | 2 ++ include/world.hpp | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/player.hpp b/include/player.hpp index 430173f..1caccc8 100644 --- a/include/player.hpp +++ b/include/player.hpp @@ -5,6 +5,8 @@ #include +constexpr const float PLAYER_SPEED_CONSTANT = 0.15f; + class PlayerSystem : public entityx::System, public entityx::Receiver { private: entityx::Entity::Id pid; diff --git a/include/world.hpp b/include/world.hpp index 36ccdfa..1f54292 100644 --- a/include/world.hpp +++ b/include/world.hpp @@ -9,10 +9,10 @@ // local game includes #include #include - #include #include #include +#include using namespace tinyxml2; /** @@ -64,11 +64,6 @@ extern std::string currentXML; */ constexpr const unsigned int DAY_CYCLE = 10000; -/** - * Defines the velocity of player when moved by the keyboard - */ -constexpr const float PLAYER_SPEED_CONSTANT = 0.15f; - /** * Defines the strongest pull gravity can have on an entity. * This is the most that can be subtracted from an entity's velocity in one @@ -165,8 +160,8 @@ public: void detect(entityx::TimeDelta dt); - void goWorldLeft(void) {} - void goWorldRight(void) {} + void goWorldLeft(Position& p); + void goWorldRight(Position& p); // worlddata2 stuff WorldData2 worldData; -- cgit v1.2.3