mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
cleaned up some of the posing code
This commit is contained in:
@@ -41,7 +41,6 @@ func _process(_delta: float) -> void:
|
||||
|
||||
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
|
||||
@@ -51,6 +50,7 @@ func _physics_process(_delta: float) -> void:
|
||||
|
||||
func on_pose_finished(player: Player) -> void:
|
||||
player.is_posing = false
|
||||
player.z_index = -2
|
||||
|
||||
func on_music_finished() -> void:
|
||||
do_sequence()
|
||||
|
@@ -29,7 +29,8 @@ func player_touch(player: Player) -> void:
|
||||
get_tree().call_group("Enemies", "flag_die")
|
||||
give_points(player)
|
||||
Global.can_time_tick = false
|
||||
player.z_index = -2
|
||||
if player.can_pose == false:
|
||||
player.z_index = -2
|
||||
player.global_position.x = $Flag.global_position.x + 3
|
||||
$Animation.play("FlagDown")
|
||||
player.state_machine.transition_to("FlagPole")
|
||||
|
Reference in New Issue
Block a user