updated the pipe cutscene, so that itll use the pipewalk animation, and custom characters pipe sfx

This commit is contained in:
JHDev2006
2025-09-26 12:48:14 +01:00
parent aa266d3607
commit 0ef8a28826
6 changed files with 59 additions and 49 deletions

View File

@@ -25,3 +25,6 @@ func update_next_level_info() -> void:
func go_to_level() -> void:
first_load = true
Global.transition_to_scene(LevelTransition.level_to_transition_to)
func play_pipe_sfx() -> void:
AudioManager.play_global_sfx("pipe")

View File

@@ -11,6 +11,7 @@ var character := ""
func _ready() -> void:
Global.player_characters_changed.connect(update)
Global.level_theme_changed.connect(update)
animation_changed.connect(on_animation_changed)
update()
func update() -> void:
@@ -30,3 +31,7 @@ func update() -> void:
return
if sprite_frames.get_frame_texture(animation, frame):
offset.y = -(sprite_frames.get_frame_texture(animation, frame).get_height() / 2.0)
func on_animation_changed() -> void:
if sprite_frames.has_animation(animation) == false and Player.ANIMATION_FALLBACKS.has(animation):
play(Player.ANIMATION_FALLBACKS[animation])