diff --git a/main.cpp b/main.cpp index d31ae48..51ec2c8 100644 --- a/main.cpp +++ b/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 diff --git a/sources/Player.cpp b/sources/Player.cpp index 08233c1..058fb29 100644 --- a/sources/Player.cpp +++ b/sources/Player.cpp @@ -10,6 +10,7 @@ void Player::shoot() { } } +// TODO: Czy strzał prawym musi mieć osobną tablicę z pociskami? void Player::alternate_shoot() { auto now = std::chrono::steady_clock::now(); if (std::chrono::duration_cast(now - lastShotTime).count() >= firerate) {