Pause game for both paths
This commit is contained in:
@ -161,8 +161,10 @@ func _unhandled_input(event):
|
||||
if event.pressed and event.keycode == KEY_ESCAPE:
|
||||
get_node("pausemenu").show()
|
||||
get_node("Panel").hide()
|
||||
for i in get_node("../../Path2D").get_children():
|
||||
i.get_children()[0].set_process(false)
|
||||
for i in get_parent().get_parent().get_children():
|
||||
if i.name.contains("Path2D"):
|
||||
for ii in i.get_children():
|
||||
ii.get_children()[0].set_process(false)
|
||||
|
||||
for i in get_parent().get_children():
|
||||
if i.name != "sidepanel":
|
||||
@ -178,8 +180,10 @@ func _unhandled_input(event):
|
||||
func GameOver() -> void:
|
||||
get_node("Panel").hide()
|
||||
get_node("GameOver").show()
|
||||
for i in get_node("../../Path2D").get_children():
|
||||
i.get_children()[0].set_process(false)
|
||||
for i in get_parent().get_parent().get_children():
|
||||
if i.name.contains("Path2D"):
|
||||
for ii in i.get_children():
|
||||
ii.get_children()[0].set_process(false)
|
||||
|
||||
for i in get_parent().get_children():
|
||||
if i.name != "sidepanel":
|
||||
@ -205,8 +209,10 @@ func GameWon() -> void:
|
||||
func _on_button_3_pressed() -> void:
|
||||
get_node("pausemenu").hide()
|
||||
get_node("Panel").show()
|
||||
for i in get_node("../../Path2D").get_children():
|
||||
i.get_children()[0].set_process(true)
|
||||
for i in get_parent().get_parent().get_children():
|
||||
if i.name.contains("Path2D"):
|
||||
for ii in i.get_children():
|
||||
ii.get_children()[0].set_process(true)
|
||||
|
||||
for i in get_parent().get_children():
|
||||
if i.name != "sidepanel":
|
||||
|
Reference in New Issue
Block a user