forked from team-sg/hero-mark-2
add pause screen
This commit is contained in:
parent
1d76d93aed
commit
74288e3ec6
8 changed files with 27 additions and 4 deletions
|
@ -5,6 +5,12 @@ func _ready():
|
|||
get_tree().paused = true
|
||||
$Body/Resume.grab_focus()
|
||||
|
||||
func _physics_process(delta):
|
||||
print(get_tree().paused)
|
||||
#Resume with pause button
|
||||
if Input.is_action_just_pressed("pause"):
|
||||
get_tree().paused = false
|
||||
queue_free()
|
||||
|
||||
func _on_Resume_pressed():
|
||||
get_tree().paused = false
|
||||
|
@ -13,7 +19,11 @@ func _on_Resume_pressed():
|
|||
|
||||
func _on_Restart_pressed():
|
||||
Game.call_deferred("restart_level")
|
||||
get_tree().paused = false
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_ExitLevel_pressed():
|
||||
get_tree().paused = false
|
||||
Game.change_map(load("res://maps/level_select.tscn"))
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue