diff --git a/game/src/Level/Level.cpp b/game/src/Level/Level.cpp index c9f5f24c..cc033695 100644 --- a/game/src/Level/Level.cpp +++ b/game/src/Level/Level.cpp @@ -67,7 +67,8 @@ Level::Level(const std::string& path, lua::LuaState& luaState) : playerEntity, entityGetter, m_luaState.getState().get("level").get("spawn_position") - //Directly use the "spawn_position" table as parameter ==> it implies that players templates must only have x and y positions as parameters + //Directly use the "spawn_position" table as parameter ==> it implies that players + //templates must only have x and y positions as parameters ); std::cout << "Players created." << std::endl; diff --git a/game/src/Systems/PlatformerSystem.cpp b/game/src/Systems/PlatformerSystem.cpp index 97fd7a28..a27c813f 100644 --- a/game/src/Systems/PlatformerSystem.cpp +++ b/game/src/Systems/PlatformerSystem.cpp @@ -191,9 +191,12 @@ void PlatformerSystem::update(entityx::EntityManager &es, entityx::EventManager float requestedXMove(0.f), requestedYMove(0.f); //Watch received events to see the requested moves - bool wantsToJump(sf::Keyboard::isKeyPressed(sf::Keyboard::Z)); //TODO: Use config to get the keys ! - bool wantsToGoLeft(sf::Keyboard::isKeyPressed(sf::Keyboard::Q)); - bool wantsToGoRight(sf::Keyboard::isKeyPressed(sf::Keyboard::D)); + bool wantsToJump(sf::Keyboard::isKeyPressed(sf::Keyboard::Up)); + bool wantsToGoLeft(sf::Keyboard::isKeyPressed(sf::Keyboard::Left)); + bool wantsToGoRight(sf::Keyboard::isKeyPressed(sf::Keyboard::Right)); + //TODO: Put the previous variables as attributes of PlatformerComponent + //and the future PlayerSystem will set them to true or false depending + //of the pressed keys (according to the config) tools::Polygon polygon = hitbox.getHitbox(); polygon.ComputeGlobalVertices();