Updated Hub World to have portals to levels and disabled the level select menu

This commit is contained in:
VoidTwo
2021-12-09 17:31:24 -06:00
parent 2147d38874
commit 037752c118
18 changed files with 389 additions and 15 deletions

View File

@@ -1,11 +1,28 @@
extends CanvasLayer
export var hub_world_path: String = 'res://Levels/Hub World.tscn'
export var disable_back_to_hub: bool = false
func _ready() -> void:
if disable_back_to_hub:
$'Menu/Menu Options/Back To Hub'.visible = false
return
func _on_resume_button_pressed() -> void:
resume()
return
func _on_back_to_hub_button_pressed():
if get_tree().change_scene(hub_world_path) != OK:
print('ERROR: Pause Screen failed to change scene to Hub World.')
resume()
queue_free()
return
func _on_quit_button_pressed() -> void:
get_tree().quit()
return
@@ -16,6 +33,11 @@ func _on_resume_button_mouse_entered() -> void:
return
func _on_back_to_hub_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