diff --git a/scripts/game.gd b/scripts/game.gd index a522a0d..432b3f5 100644 --- a/scripts/game.gd +++ b/scripts/game.gd @@ -33,6 +33,7 @@ var game_ended=false # Called when the node enters the scene tree for the first time. func _ready() -> void: + Gamestate.resetTimeElapsed() countdown.start() countdown_label.visible=true diff --git a/scripts/gamestate.gd b/scripts/gamestate.gd index 4e4b194..13a8901 100644 --- a/scripts/gamestate.gd +++ b/scripts/gamestate.gd @@ -56,3 +56,6 @@ func addTimeElapsed(delta): func getTimeElapsed(): return time_elapsed + +func resetTimeElapsed(): + time_elapsed=0