Added pause capability to all levels, added music to Level 5, added a simple chasing AI to the glowing ghosts, and optimized the Main Menu scene

This commit is contained in:
VoidTwo
2021-11-28 20:33:22 -06:00
parent b6b8edce83
commit 4c55683bde
41 changed files with 396 additions and 151 deletions

39
GUI/Pause Screen.gd Normal file
View File

@@ -0,0 +1,39 @@
extends CanvasLayer
func _on_resume_button_pressed() -> void:
resume()
return
func _on_quit_button_pressed() -> void:
get_tree().quit()
return
func _on_resume_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _on_quit_button_mouse_entered() -> void:
$'Menu Button Hover'.play(0.0)
return
func _input(event: InputEvent) -> void:
if event.is_action_pressed('ui_cancel'):
if get_tree().paused:
resume()
else:
get_tree().paused = true
$Background.visible = true
$Menu.visible = true
return
func resume() -> void:
$Background.visible = false
$Menu.visible = false
get_tree().paused = false
return