Commit 4747f943 authored by Valentin Bartschies's avatar Valentin Bartschies
Browse files

Game Over screen when playerLives is 0

parent 19c7cb3a
......@@ -10,6 +10,7 @@
const int GAME_SCREEN_WIDTH = 400, GAME_SCREEN_HEIGHT = 400, FRAME_RATE = 60;
int FRAMES_COUNT = 0;
extern const int playerLives;
int startTime = 0, endTime = 0;
......@@ -60,6 +61,11 @@ int main() {
calcMenu();
} else if (state == GAME) {
calcGame();
if (playerLives <= 0) {
state = GAME_OVER;
endTime=GetTime();
calcGameOver(endTime-startTime);
}
}
BeginDrawing();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment