Prepping for other scenes.

This commit is contained in:
2026-01-08 23:12:02 -06:00
parent cd2dd3fe0e
commit ba61ab90a5
25 changed files with 159 additions and 10 deletions

View File

@@ -2,6 +2,8 @@ class_name RootScene extends Node3D
@export var overworld:Node3D = null
@export var initial:Node3D = null
@export var battle:Node3D = null
@export var cooking:Node3D = null
func _enter_tree() -> void:
SCENE.sceneChanged.connect(onSceneChange)
@@ -12,7 +14,8 @@ func _exit_tree() -> void:
func onSceneChange(newScene:SceneSingleton.SceneType) -> void:
print("overworld", overworld)
remove_child(overworld)
if overworld && overworld.get_parent() == self:
remove_child(overworld)
remove_child(initial)
overworld.visible = false