fixed bug where pressing pause button when paused
This commit is contained in:
parent
758cf57f8d
commit
809b6510c4
3 changed files with 8 additions and 3 deletions
4
game.gd
4
game.gd
|
@ -158,7 +158,7 @@ func play_music(song):
|
|||
if Game.ac_music.stream != song or Game.ac_music.playing == false:
|
||||
play_sound(song,ac_music)
|
||||
|
||||
func _process(delta):
|
||||
func _physics_process(delta):
|
||||
if Debug.entry == false:
|
||||
#CRT FILTER
|
||||
if Input.is_action_just_pressed("crt"):
|
||||
|
@ -171,6 +171,6 @@ func _process(delta):
|
|||
else:
|
||||
OS.set_window_fullscreen(false)
|
||||
#Pause
|
||||
if Input.is_action_just_pressed("pause") && can_pause:
|
||||
if Input.is_action_just_pressed("pause") && can_pause && !get_tree().paused:
|
||||
var viewport = get_parent().get_node("Main/Control/ViewportContainer/Viewport")
|
||||
viewport.add_child(pause_screen.instance())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue