This commit is contained in:
2025-11-26 18:57:37 -06:00
parent 1e83200bba
commit d532a9ab21
25 changed files with 525 additions and 534 deletions

View File

@@ -4,31 +4,31 @@ class_name RootScene extends Node3D
@export var initial:Node3D = null
func _enter_tree() -> void:
SCENE.sceneChanged.connect(onSceneChange)
SCENE.setScene(SceneSingleton.SceneType.INITIAL)
SCENE.sceneChanged.connect(onSceneChange)
SCENE.setScene(SceneSingleton.SceneType.INITIAL)
func _exit_tree() -> void:
push_error("RootScene should not be removed from the scene tree. This is a bug.")
push_error("RootScene should not be removed from the scene tree. This is a bug.")
func onSceneChange(newScene:SceneSingleton.SceneType) -> void:
print("overworld", overworld)
remove_child(overworld)
remove_child(initial)
print("overworld", overworld)
remove_child(overworld)
remove_child(initial)
overworld.visible = false
initial.visible = false
overworld.visible = false
initial.visible = false
match newScene:
SceneSingleton.SceneType.INITIAL:
add_child(initial)
initial.visible = true
match newScene:
SceneSingleton.SceneType.INITIAL:
add_child(initial)
initial.visible = true
SceneSingleton.SceneType.OVERWORLD:
add_child(overworld)
overworld.visible = true
SceneSingleton.SceneType.OVERWORLD:
add_child(overworld)
overworld.visible = true
SceneSingleton.SceneType.UNSET:
pass
SceneSingleton.SceneType.UNSET:
pass
_:
pass
_:
pass