mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 05:20:06 +01:00
9 lines
274 B
GDScript
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
|