示例#1
0
        public override void Update(Player0 player)
        {
            base.Update(player);

            player.Velocity = CurrentDashVelocity;

            CurrentDashVelocity *= 0.5;
            if (player.Velocity.X < DashEndThreshold)
            {
                player.ChangeToPreviousMovement();
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
        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;
            }
        }