17 lines
431 B
GDScript3
17 lines
431 B
GDScript3
|
|
extends Control
|
||
|
|
|
||
|
|
var paused : bool = false
|
||
|
|
|
||
|
|
# Called when the node enters the scene tree for the first time.
|
||
|
|
func _ready() -> void:
|
||
|
|
pass # Replace with function body.
|
||
|
|
|
||
|
|
|
||
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
|
func _process(delta: float) -> void:
|
||
|
|
visible = paused
|
||
|
|
if Input.is_action_just_pressed("pause"):
|
||
|
|
paused = !paused
|
||
|
|
get_tree().set_pause(paused)
|
||
|
|
#get_tree().get_root().process_mode
|