Esempio n. 1
0
        public override void HandleInput(InputMenuState input)
        {
            if (input.IsMenuUp(ControllingPlayer))
            {
                selectedEntry--;

                if (selectedEntry < 0)
                {
                    selectedEntry = menuEntries.Count - 1;
                }
            }

            if (input.IsMenuDown(ControllingPlayer))
            {
                selectedEntry++;

                if (selectedEntry >= menuEntries.Count)
                {
                    selectedEntry = 0;
                }
            }

            PlayerIndex playerIndex;

            if (input.IsMenuSelect(ControllingPlayer, out playerIndex))
            {
                OnSelectEntry(selectedEntry, playerIndex);
            }
            else if (input.IsMenuCancel(ControllingPlayer, out playerIndex))
            {
                OnCancel(playerIndex);
            }
        }
Esempio n. 2
0
        public override void HandleInput(InputMenuState input)
        {
            PlayerIndex playerIndex;

            if (input.IsMenuSelect(ControllingPlayer, out playerIndex) == true)
            {
                ScreenManager.AddScreen(new ScoreTransitionScreen(levelNo),
                                        ControllingPlayer);
            }

            TimeScrolling(input);
        }
Esempio n. 3
0
        public override void HandleInput(InputMenuState input)
        {
            PlayerIndex playerIndex;

            if (input.IsMenuSelect(ControllingPlayer, out playerIndex) == true)
            {
                ScreenManager.AddScreen(new ScoreTransitionScreen(zoneNo, levelNo),
                                        ControllingPlayer);
            }

            if (input.RightTrigger(playerIndex) > 0.3f ||
                input.CurrentGamePadStates[0].IsButtonDown(Buttons.RightShoulder) == true ||
                input.CurrentKeyboardStates[0].IsKeyDown(Keys.D) == true ||
                input.CurrentKeyboardStates[0].IsKeyDown(Keys.Right) == true)
            {
                ScreenManager.AddScreen(new TimeScreenOnline(levelName, zoneNo, levelNo),
                                        ControllingPlayer);
            }

            TimeScrolling(input);
        }