forked from team-sg/hero-mark-2
pausing only possible in map.gd
This commit is contained in:
parent
aa86cbc928
commit
7b6d0197cd
8 changed files with 111 additions and 29 deletions
|
@ -17,6 +17,14 @@ func _ready():
|
|||
Audio.play_music(music)
|
||||
|
||||
func _physics_process(delta):
|
||||
if Debug.entry == false && Game.can_pause:
|
||||
#Pause
|
||||
if Input.is_action_just_pressed("pause") && !get_tree().paused:
|
||||
get_parent().add_child(Game.pause_screen.instance())
|
||||
# restart level
|
||||
if Input.is_action_just_pressed("restart"):
|
||||
call_deferred("restart_level")
|
||||
|
||||
if Game.golds == 50 && Game.shards == 5:
|
||||
#Time bonus
|
||||
collectible_bonus = true
|
||||
|
@ -30,3 +38,4 @@ func _physics_process(delta):
|
|||
time_bonus = true
|
||||
else:
|
||||
time_bonus = false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue