timer start at first click

This commit is contained in:
_N3m0 2024-03-18 08:32:42 +01:00
parent f6901505af
commit cf34d87fc1
1 changed files with 4 additions and 1 deletions

5
main.c
View File

@ -321,7 +321,10 @@ int main(void)
} }
if (game_state == PLAYING) { if (game_state == PLAYING) {
timer += GetFrameTime(); if (need_to_fill)
timer = 0;
else
timer += GetFrameTime();
snprintf(timer_text, sizeof(timer_text), "%d", (int) timer); snprintf(timer_text, sizeof(timer_text), "%d", (int) timer);
} }