summaryrefslogtreecommitdiff
path: root/scenes/pause.gd
blob: 43a2d5bdac2d479efe72a1592401c8788bade2e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extends Node2D

onready var pause_menu = $"."
onready var backgroud = $Sprite

func pause():
	pause_menu.visible = true
	pause_menu.pause_mode = PAUSE_MODE_PROCESS # to be save
	get_tree().paused = true


func _ready():
	backgroud.modulate.a = 0.5


func _on_Resume_on_click():
	pause_menu.visible = false
	get_tree().paused = false


func _on_Main_Menu_on_click():
	get_tree().change_scene("res://scenes/menu.tscn")