Merge pull request #395 from KirbyKid256/pulls/pose-at-door

All-Stars Pose at Level End
This commit is contained in:
Joe H
2025-09-26 12:48:31 +01:00
committed by GitHub
3 changed files with 17 additions and 0 deletions

View File

@@ -39,6 +39,19 @@ 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 >= global_position and i.sprite.sprite_frames.has_animation("PoseDoor"):
i.is_posing = true; i.can_pose = false
i.global_position = global_position
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()