Add Q for quit.
This commit is contained in:
parent
d08825f98d
commit
34445c7540
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,9 @@ void Game::processEvents(InputState & inputState) {
|
||||||
if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) {
|
if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) {
|
||||||
inputState.enableAI = !inputState.enableAI;
|
inputState.enableAI = !inputState.enableAI;
|
||||||
}
|
}
|
||||||
|
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Q)) {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
inputState.down = sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Down);
|
inputState.down = sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Down);
|
||||||
inputState.up = sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up);
|
inputState.up = sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up);
|
||||||
|
|
Loading…
Reference in a new issue