mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-21 23:18:11 +00:00
New Optional Animation States (#420)
* new animation states additional conditional animation states, including: - SkidAttack - IdleAttack - WalkAttack - RunAttack - CrouchJump - CrouchMove ... along with a new set of animations, the Bump animations (play when hitting your head on a block) - JumpBump - CrouchBump - SwimBump * added fly animations & tweaked bump animation time new anims for FlyIdle, FlyUp, FlyMove, FlyAttack, and FlyBump, which all fallback on their Swim counterparts if not found. also changed around some animation fallbacks which made more sense, like bumps using fall animations instead if applicable. * added bump ignore checks and added a general bump animation you can now define Bump which will define a bump animation for all bump animations. additionally, bump animations will only play if they can detect an animation. no more fallbacks needed
This commit is contained in:
@@ -186,22 +186,47 @@ func get_animation_name() -> String:
|
||||
if player.attacking:
|
||||
if player.crouching:
|
||||
return "CrouchAttack"
|
||||
if player.is_actually_on_floor():
|
||||
return "Attack"
|
||||
elif player.in_water or player.flight_meter > 0:
|
||||
return "SwimAttack"
|
||||
elif player.is_actually_on_floor():
|
||||
if player.skidding:
|
||||
return "SkidAttack"
|
||||
elif abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
|
||||
if player.in_water:
|
||||
return "SwimAttack"
|
||||
elif player.flight_meter > 0:
|
||||
return "FlyAttack"
|
||||
elif abs(player.velocity.x) < player.RUN_SPEED - 10:
|
||||
return "WalkAttack"
|
||||
else:
|
||||
return "RunAttack"
|
||||
else:
|
||||
return "IdleAttack"
|
||||
else:
|
||||
return "AirAttack"
|
||||
if player.in_water:
|
||||
return "SwimAttack"
|
||||
elif player.flight_meter > 0:
|
||||
return "FlyAttack"
|
||||
else:
|
||||
return "AirAttack"
|
||||
if player.crouching and not wall_pushing:
|
||||
if player.velocity.y > 0 and player.is_on_floor() == false:
|
||||
return "CrouchFall"
|
||||
if player.bumping and player.can_bump_crouch:
|
||||
return "CrouchBump"
|
||||
elif player.is_on_floor() == false:
|
||||
if player.velocity.y > 0:
|
||||
return "CrouchFall"
|
||||
elif player.velocity.y < 0:
|
||||
return "CrouchJump"
|
||||
elif player.is_actually_on_floor():
|
||||
if abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
|
||||
return "CrouchMove"
|
||||
return "Crouch"
|
||||
if player.is_actually_on_floor():
|
||||
if player.skidding:
|
||||
return "Skid"
|
||||
elif abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
|
||||
if player.in_water or player.flight_meter > 0:
|
||||
if player.in_water:
|
||||
return "WaterMove"
|
||||
elif player.flight_meter > 0:
|
||||
return "FlyMove"
|
||||
elif abs(player.velocity.x) < player.RUN_SPEED - 10:
|
||||
return "Walk"
|
||||
else:
|
||||
@@ -213,13 +238,26 @@ func get_animation_name() -> String:
|
||||
return "LookUp"
|
||||
return "Idle"
|
||||
else:
|
||||
if player.in_water or player.flight_meter > 0:
|
||||
if player.in_water:
|
||||
if swim_up_meter > 0:
|
||||
return "SwimUp"
|
||||
if player.bumping and player.can_bump_swim:
|
||||
return "SwimBump"
|
||||
else:
|
||||
return "SwimUp"
|
||||
else:
|
||||
return "SwimIdle"
|
||||
elif player.flight_meter > 0:
|
||||
if swim_up_meter > 0:
|
||||
if player.bumping and player.can_bump_fly:
|
||||
return "FlyBump"
|
||||
else:
|
||||
return "FlyUp"
|
||||
else:
|
||||
return "FlyIdle"
|
||||
if player.has_jumped:
|
||||
if player.velocity.y < 0:
|
||||
if player.bumping and player.can_bump_jump:
|
||||
return "JumpBump"
|
||||
elif player.velocity.y < 0:
|
||||
if player.is_invincible:
|
||||
return "StarJump"
|
||||
return "Jump"
|
||||
|
Reference in New Issue
Block a user