Skip to content

Commit

Permalink
Window closes on player dealth
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubspy committed Nov 1, 2021
1 parent aa98444 commit ac13838
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/GameManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ void GameManager::runGame()
// Once input is handled, we now want to update all of our objects
updateEntities(frameTime);

if(!this->_player.isAlive())
{
printf("YOU DIED!!!!!\n");
this->_currentState = GameState::exiting;
}

// Next step is to check the collisions on all of our entities
checkCollisions();

Expand Down

0 comments on commit ac13838

Please sign in to comment.