Ejemplo n.º 1
0
        private static void FirstPlayerBallControls(GameTime gameTime)
        {
            if (FirstPlayer.Instance.InputManagerInstance.KeyDown(Keys.LeftControl))
            {
                ballFirst.BallFired = true;
                firstBallTimer.Start();

                if (!ballFirst.BallInitialised)
                {
                    ballFirst.CannonEffect.Play();
                    ballFirst.FireFlashCounter = 0;
                    ballFirst.Initialise(ballFirst.BallFiredPos = new Vector2(FirstPlayer.Instance.Ship.Position.X + FirstPlayer.Instance.ShipImage.Texture.Width, FirstPlayer.Instance.Ship.Position.Y + (FirstPlayer.Instance.ShipImage.Texture.Height / 2f)), FirstPlayer.Instance.PlayerType);
                    ballFirst.BallInitialised = true;
                }
            }

            if (ballFirst.BallFired)
            {
                ballFirst.UpdateFirst(gameTime);
            }
        }