20 lines
424 B
GDScript
20 lines
424 B
GDScript
extends Control
|
|
|
|
var is_paused = false
|
|
|
|
@onready var resume_button = $CenterContainer/HBoxContainer/ResumeButton
|
|
@onready var quit_button = $CenterContainer/HBoxContainer/QuitButton
|
|
|
|
func unpause():
|
|
self.hide()
|
|
get_tree().paused = false
|
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
|
|
|
func pause():
|
|
self.show()
|
|
get_tree().paused = true
|
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
|
|
|
func quit():
|
|
get_tree().quit()
|