Lekki refactor
This commit is contained in:
5
main.cpp
5
main.cpp
@@ -43,11 +43,8 @@ int main()
|
||||
// Tu są handlowane eventy
|
||||
sf::Event event{};
|
||||
while (mainWindow.pollEvent(event)) {
|
||||
if(event.type == sf::Event::Closed)
|
||||
if(event.type == sf::Event::Closed || sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
|
||||
mainWindow.close();
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape)) {
|
||||
mainWindow.close();
|
||||
}
|
||||
}
|
||||
|
||||
// poruszanie się statkiem
|
||||
|
||||
Reference in New Issue
Block a user