Prepping for other scenes.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user