diff --git a/src/Game.cpp b/src/Game.cpp index 0262418..23b2e81 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -20,8 +20,6 @@ void Game::loadLevel(int levelId) if(!result) { -// std::cerr << "Error while loading level :\n" << "\t" << result.description() << std::endl; -// exit(-1); pro_maat::errorWindow(result.description()); } @@ -42,6 +40,8 @@ void Game::runGame() { sf::RenderWindow window(sf::VideoMode(1280,1024),"Project Maat"); + sf::Clock clock; + while (window.isOpen()) { sf::Event event; @@ -51,10 +51,10 @@ void Game::runGame() { window.close(); } - // FIXME : For testing purposes - if (event.type == sf::Event::KeyPressed) + if (clock.getElapsedTime().asMilliseconds() >= 200) { currentLevel->runStep(); + clock.restart(); } } window.clear(sf::Color::White);