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