mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-21 23:18:11 +00:00
Optional Animations 2: Electric Boogaloo (#596)
* Additional optional animations for water/wing power-up + extras * Added animation fallbacks for new animations * Kicking animation function * Kick anim functionality for shells * Player performs kick animation * RunJump anims + quick fixes new anims, including RunJump, RunJumpFall and RunJumpBump (incredible name) which play depending on the X velocity the player left the ground with. also fixed the bob-omb to play the kick animation as well as it should also * Updated "FlyMove" to "WingMove" for consistency * Update "FlyMove" to "WingMove" in animation fallbacks
This commit is contained in:
@@ -209,6 +209,8 @@ func get_animation_name() -> String:
|
||||
return "FlyAttack"
|
||||
else:
|
||||
return "AirAttack"
|
||||
if player.kicking and player.can_kick_anim:
|
||||
return "Kick"
|
||||
if player.crouching and not wall_pushing:
|
||||
if player.bumping and player.can_bump_crouch:
|
||||
return "CrouchBump"
|
||||
@@ -220,7 +222,12 @@ func get_animation_name() -> String:
|
||||
elif player.is_actually_on_floor():
|
||||
if abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
|
||||
return "CrouchMove"
|
||||
return "Crouch"
|
||||
elif player.in_water:
|
||||
return "WaterCrouch"
|
||||
elif player.flight_meter > 0:
|
||||
return "WingCrouch"
|
||||
else:
|
||||
return "Crouch"
|
||||
if player.is_actually_on_floor():
|
||||
if player.skidding:
|
||||
return "Skid"
|
||||
@@ -228,17 +235,26 @@ func get_animation_name() -> String:
|
||||
if player.in_water:
|
||||
return "WaterMove"
|
||||
elif player.flight_meter > 0:
|
||||
return "FlyMove"
|
||||
return "WingMove"
|
||||
elif abs(player.velocity.x) < player.RUN_SPEED - 10:
|
||||
return "Walk"
|
||||
else:
|
||||
return "Run"
|
||||
else:
|
||||
if player.in_water or player.flight_meter > 0:
|
||||
return "WaterIdle"
|
||||
if Global.player_action_pressed("move_up", player.player_id):
|
||||
return "LookUp"
|
||||
return "Idle"
|
||||
if player.in_water:
|
||||
return "WaterLookUp"
|
||||
elif player.flight_meter > 0:
|
||||
return "WingLookUp"
|
||||
else:
|
||||
return "LookUp"
|
||||
else:
|
||||
if player.in_water:
|
||||
return "WaterIdle"
|
||||
elif player.flight_meter > 0:
|
||||
return "WingIdle"
|
||||
else:
|
||||
return "Idle"
|
||||
else:
|
||||
if player.in_water:
|
||||
if swim_up_meter > 0:
|
||||
@@ -258,15 +274,24 @@ func get_animation_name() -> String:
|
||||
return "FlyIdle"
|
||||
if player.has_jumped:
|
||||
if player.bumping and player.can_bump_jump:
|
||||
return "JumpBump"
|
||||
if abs(player.velocity_x_jump_stored) < player.RUN_SPEED - 10:
|
||||
return "RunJumpBump"
|
||||
else:
|
||||
return "JumpBump"
|
||||
elif player.velocity.y < 0:
|
||||
if player.is_invincible:
|
||||
return "StarJump"
|
||||
return "Jump"
|
||||
elif abs(player.velocity_x_jump_stored) < player.RUN_SPEED - 10:
|
||||
return "RunJump"
|
||||
else:
|
||||
return "Jump"
|
||||
else:
|
||||
if player.is_invincible:
|
||||
return "StarFall"
|
||||
return "JumpFall"
|
||||
elif abs(player.velocity_x_jump_stored) < player.RUN_SPEED - 10:
|
||||
return "RunJumpFall"
|
||||
else:
|
||||
return "JumpFall"
|
||||
else:
|
||||
# guzlad: Fixes characters with fall anims not playing them, but also prevents old characters without that anim not being accurate
|
||||
if !player.sprite.sprite_frames.has_animation("Fall"):
|
||||
|
Reference in New Issue
Block a user