Beispiel #1
0
        // process input
        public override void ProcessInput(float elapsedTime, InputManager input)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            int i, j = (int)gameManager.GameMode;

            for (i = 0; i < j; i++)
            {
                // Any key/button to go back
                if (input.IsButtonPressedA(i) ||
                    input.IsButtonPressedB(i) ||
                    input.IsButtonPressedX(i) ||
                    input.IsButtonPressedY(i) ||
                    input.IsButtonPressedLeftShoulder(i) ||
                    input.IsButtonPressedRightShoulder(i) ||
                    input.IsButtonPressedLeftStick(i) ||
                    input.IsButtonPressedRightStick(i) ||
                    input.IsButtonPressedBack(i) ||
                    input.IsButtonPressedStart(i) ||
                    input.IsKeyPressed(i, Keys.Enter) ||
                    input.IsKeyPressed(i, Keys.Escape) ||
                    input.IsKeyPressed(i, Keys.Space))
                {
                    screenManager.SetNextScreen(ScreenType.ScreenIntro);
                    gameManager.PlaySound("menu_cancel");
                }
            }
        }
Beispiel #2
0
        // process input
        public override void ProcessInput(float elapsedTime, InputManager input)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            gameManager.ProcessInput(elapsedTime, input);

            int i, j = (int)gameManager.GameMode;
            for (i = 0; i < j; i++)
                if (input.IsKeyPressed(i,Keys.Escape) || input.IsButtonPressedBack(i))
                {
                    gameManager.GetPlayer(i).Score = -1;
                    screenManager.SetNextScreen(ScreenType.ScreenEnd);
                    gameManager.PlaySound("menu_cancel");
                }
        }
Beispiel #3
0
        // process input
        public override void ProcessInput(float elapsedTime, InputManager input)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            gameManager.ProcessInput(elapsedTime, input);

            int i, j = (int)gameManager.GameMode;

            for (i = 0; i < j; i++)
            {
                if (input.IsKeyPressed(i, Keys.Escape) || input.IsButtonPressedBack(i))
                {
                    gameManager.GetPlayer(i).Score = -1;
                    screenManager.SetNextScreen(ScreenType.ScreenEnd);
                    gameManager.PlaySound("menu_cancel");
                }
            }
        }
Beispiel #4
0
        // process input
        public override void ProcessInput(float elapsedTime, InputManager input)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            int i, j = (int)gameManager.GameMode;
            for (i = 0; i < j; i++)
            {
                // Any key/button to go back
                if (input.IsButtonPressedA(i) ||
                    input.IsButtonPressedB(i) ||
                    input.IsButtonPressedX(i) ||
                    input.IsButtonPressedY(i) ||
                    input.IsButtonPressedLeftShoulder(i) ||
                    input.IsButtonPressedRightShoulder(i) ||
                    input.IsButtonPressedLeftStick(i) ||
                    input.IsButtonPressedRightStick(i) ||
                    input.IsButtonPressedBack(i) ||
                    input.IsButtonPressedStart(i) ||
                    input.IsKeyPressed(i, Keys.Enter) ||
                    input.IsKeyPressed(i, Keys.Escape) ||
                    input.IsKeyPressed(i, Keys.Space))
                {
                    screenManager.SetNextScreen(ScreenType.ScreenIntro);
                    gameManager.PlaySound("menu_cancel");
                }
            }
        }