19 lines
340 B
GDScript
19 lines
340 B
GDScript
extends ColorRect
|
|
|
|
var paused = false setget set_paused
|
|
|
|
func set_paused(value):
|
|
paused = value
|
|
get_tree().paused = paused
|
|
visible = paused
|
|
|
|
func _on_ResumeButton_pressed():
|
|
self.paused = false
|
|
|
|
func _on_QuitButton_pressed():
|
|
get_tree().quit()
|
|
|
|
func _process(_delta):
|
|
if Input.is_action_just_pressed("pause"):
|
|
self.paused = !paused
|