Ejemplo n.º 1
0
        public void Jump(WindowPixel[,] gameScreen)
        {
            if (!isJumping && canJump && !IsShapeHit(gameScreen, CenterPosX, CenterPosY + MovementIncrement) ||
                (!IsShapeHit(gameScreen, CenterPosX, CenterPosY + MovementIncrement) &&//double jump
                 PlayerOnePowerUps.UsePowerUp(PowerUps.Double_Jump)))
            {
                StateMachine.Jump();
                isJumping = true;
                canJump   = false;

                VerticalAcceleration     = JumpAcceleration;
                VerticalAccelerationPool = JumpAccelerationPool;
                VerticalSpeed            = JumpVerticalSpeed;
            }
        }
Ejemplo n.º 2
0
 public void UsePowerUp(PowerUps powerUp)
 {
     PlayerOnePowerUps.UsePowerUp(powerUp);
 }