public override void Update(Player0 player) { base.Update(player); player.Velocity = CurrentDashVelocity; CurrentDashVelocity *= 0.5; if (player.Velocity.X < DashEndThreshold) { player.ChangeToPreviousMovement(); } }
public override void Update(Player0 player) { base.Update(player); if (player.Velocity.Y == 0 && player.ObstacleAt(Side.Down)) { player.ChangeToPreviousMovement(); } else { // air control player.Velocity.X = Freeze ? 0 : Direction.X * FallStep; player.Velocity.Y += Gravity; } }
public override void Update(Player0 player) { base.Update(player); if (Jump.Y == 0 && player.ObstacleAt(Side.Down)) { player.ChangeToPreviousMovement(); } else { if (Jump != Vector2f.Zero) { player.Velocity = Jump; Jump = Vector2f.Zero; } // air control player.Velocity.X = Freeze ? 0 : Direction.X * AirStep * RunMultiplier; player.Velocity.Y += Gravity; } }