mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 23:48:11 +00:00
improvements
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user