blob: 0115b1af04dac239dac0bde8492ad87044a2f409 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
extends CanvasLayer
onready var pause_menu = $Node2D
signal unpause()
func pause():
pause_mode = PAUSE_MODE_PROCESS # to be save
pause_menu.visible = true
get_tree().paused = true
func _on_Resume_on_click():
pause_menu.visible = false
get_tree().paused = false
emit_signal("unpause")
func _on_Main_Menu_on_click():
get_tree().paused = false
get_tree().change_scene("res://scenes/menu.tscn")
|