All-Stars Pose at Level End

This adds a new and optional animation for Characters called `PoseDoor`. When a character uses this animation, they stop at the entrance of the castle door to strike a pose like in All-Stars.
This commit is contained in:
KirbyKidJ
2025-09-25 17:47:11 -07:00
parent 40c2c04fcd
commit 2d4b6105b6
5 changed files with 24 additions and 0 deletions

View File

@@ -39,6 +39,18 @@ func _process(_delta: float) -> void:
if get_node_or_null("Wall") != null:
%Wall.visible = show_walls
func _physics_process(_delta: float) -> void:
for i: Player in get_tree().get_nodes_in_group("Players"):
if not i.sprite.sprite_frames.has_animation("PoseDoor"): i.can_pose = false; continue
if i.can_pose and i.global_position >= %PosePoint.global_position and i.sprite.sprite_frames.has_animation("PoseDoor"):
i.is_posing = true; i.can_pose = false
i.play_animation("PoseDoor")
i.sprite.animation_finished.connect(on_pose_finished.bind(i))
i.sprite.animation_looped.connect(on_pose_finished.bind(i))
func on_pose_finished(player: Player) -> void:
player.is_posing = false
func on_music_finished() -> void:
do_sequence()