Godot 4.5.1

This commit is contained in:
2025-12-14 22:43:11 +10:00
parent 5805ac2260
commit 4dd1ce64f5
433 changed files with 2922 additions and 585 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