Beispiel #1
0
 public override void HandleInput(InputMenuState input)
 {
     if (input.IsPauseGame(ControllingPlayer))
     {
         ScreenManager.AddScreen(new PauseMenuScreen(), ControllingPlayer);
     }
 }
Beispiel #2
0
        private void TimeScrolling(InputMenuState input)
        {
            if (input.IsMenuDown(ControllingPlayer) == true)
            {
                if (currentPage == maxPages)
                {
                    return;
                }
                else
                {
                    currentPage += 1;
                }
            }

            if (input.IsMenuUp(ControllingPlayer) == true)
            {
                if (currentPage == 1)
                {
                    return;
                }
                else
                {
                    currentPage -= 1;
                }
            }
        }
Beispiel #3
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);
            }
        }
Beispiel #4
0
        public override void HandleInput(InputMenuState input)
        {
            PlayerIndex playerIndex;

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

            TimeScrolling(input);
        }
 public override void HandleInput(InputMenuState input)
 {
     if (input.IsPauseGame(ControllingPlayer))
     {
         ScreenManager.AddScreen(new PauseMenuScreen(), ControllingPlayer);
     }
     if (level.MatchFinished(out index) == true)
     {
         if (coroutine.Finished == false)
         {
             coroutine.Update();
         }
     }
 }
Beispiel #6
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);
        }
Beispiel #7
0
        public override void HandleInput(InputMenuState input)
        {
            if (input.IsMenuDown(ControllingPlayer) == true)
            {
                characterScroll--;

                if (characterScroll < 0)
                {
                    characterScroll = characters.Length - 1;
                }

                if (characterScroll > characters.Length - 1)
                {
                    characterScroll = 0;
                }
            }

            if (input.IsMenuUp(ControllingPlayer) == true)
            {
                characterScroll++;

                if (characterScroll < 0)
                {
                    characterScroll = characters.Length - 1;
                }

                if (characterScroll > characters.Length - 1)
                {
                    characterScroll = 0;
                }
            }

            if (input.IsButtonAPressed(ControllingPlayer) == true)
            {
                if (playerName.Length < maxNameLength)
                {
                    if (characterScroll >= 0)
                    {
                        playerName += characters[characterScroll];
                    }
                }
            }

            if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Tab) == true)
            {
                if (input.LastKeyboardStates[0].IsKeyUp(Keys.Tab) == true)
                {
                    if (playerName.Length < maxNameLength)
                    {
                        if (characterScroll >= 0)
                        {
                            playerName += characters[characterScroll];
                        }
                    }
                }
            }


            if (input.IsButtonBPressed(ControllingPlayer) == true)
            {
                int removeLetter = playerName.Length - 1;

                if (removeLetter >= 0)
                {
                    playerName = playerName.Remove(removeLetter);
                }
            }


            if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Delete) == true)
            {
                if (input.LastKeyboardStates[0].IsKeyUp(Keys.Delete) == true)
                {
                    int removeLetter = playerName.Length - 1;

                    if (removeLetter >= 0)
                    {
                        playerName = playerName.Remove(removeLetter);
                    }
                }
            }

            if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Back) == true)
            {
                if (input.LastKeyboardStates[0].IsKeyUp(Keys.Back) == true)
                {
                    int removeLetter = playerName.Length - 1;

                    if (removeLetter >= 0)
                    {
                        playerName = playerName.Remove(removeLetter);
                    }
                }
            }

            if (input.IsPauseGame(ControllingPlayer) == true ||
                input.CurrentKeyboardStates[0].IsKeyDown(Keys.Enter) == true)
            {
                playerData.PlayerName = playerName;
                HighTime.SaveData(levelName, playerData);

                ScreenManager.AddScreen(new TimeScreen(levelName, currentZone, currentLevel),
                                        ControllingPlayer);
            }
        }