Files
godot-demo-projects/audio/rhythm_game/scenes/main/pause_handler.gd
2025-05-17 16:55:21 -05:00

9 lines
274 B
GDScript

# Pause logic is separated out since it needs to run with PROCESS_MODE_ALWAYS.
extends Node
func _process(_delta: float) -> void:
if Input.is_action_just_pressed("pause"):
get_tree().paused = not get_tree().paused
$"../Control/PauseLabel".visible = get_tree().paused