From 47cade0dbca67f199ddc4518971254858e1218a1 Mon Sep 17 00:00:00 2001 From: Ryan Reed Date: Mon, 14 Aug 2023 19:48:00 -0400 Subject: [PATCH] Moving pause check for clarity --- world.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/world.gd b/world.gd index 126d194..f2f883d 100644 --- a/world.gd +++ b/world.gd @@ -52,6 +52,8 @@ func _ready() -> void: func _input(event: InputEvent) -> void: if event.is_action_pressed("Pause"): + if is_paused: generation_timer.start() + else: generation_timer.stop() is_paused = !is_paused background_ui.visible = is_paused if event.is_action_pressed("Menu"): @@ -132,8 +134,6 @@ func count_living_neighbors(pos: Vector2) -> int: ## Loop through world to generate cell states, hide/show cells depending on state func process_generation() -> void: - if is_paused: return - generation += 1 total_living = 0