improvements

This commit is contained in:
JoeMama
2025-10-10 21:29:26 +01:00
parent 01238a0f1c
commit 7feff48380
17 changed files with 753 additions and 387 deletions

View File

@@ -342,7 +342,7 @@ func clear_saved_values() -> void:
lives = 3
player_power_states = "0000"
func transition_to_scene(scene_path := "") -> void:
func transition_to_scene(scene_path = "") -> void:
Global.fade_transition = bool(Settings.file.visuals.transition_animation)
if transitioning_scene:
return
@@ -355,7 +355,10 @@ func transition_to_scene(scene_path := "") -> void:
%TransitionBlock.modulate.a = 1
$Transition.show()
await get_tree().create_timer(0.1, true).timeout
get_tree().change_scene_to_file(scene_path)
if scene_path is String:
get_tree().change_scene_to_file(scene_path)
elif scene_path is PackedScene:
get_tree().change_scene_to_packed(scene_path)
await get_tree().scene_changed
await get_tree().create_timer(0.15, true).timeout
if fade_transition: