Beispiel #1
0
        public void Update(GameTime gameTime, InputHelper input)
        {
            if (input.IsNewPress(Buttons.Back) || input.IsNewPress(Keys.Escape))
            {
                gameController.Exit();
            }

            if (input.IsNewPress(Keys.Left))
            {
                menuIndex--;
                if (menuIndex < 0)
                {
                    menuIndex = menuOptions.Count - 1;
                }
            }
            else if (input.IsNewPress(Keys.Right))
            {
                menuIndex++;
                if (menuIndex >= menuOptions.Count)
                {
                    menuIndex = 0;
                }
            }

            if (input.IsNewPress(Keys.Enter))
            {
                gameController.changeToScreen(menuOptions[menuIndex]);
            }
        }
Beispiel #2
0
        public void Update(GameTime gameTime, InputHelper input)
        {
            if (input.IsNewPress(Buttons.Back) || input.IsNewPress(Keys.Escape))
            {
                gameController.changeToScreen(GameController.Screens.MainMenu);
            }

            updateGamepadSticks(gameTime, input);
            updateKeyboardInput(gameTime, input);

            foreach (FilmCard c in cards)
            {
                if (c.delete)
                {
                    cards.Remove(c);
                }
                else
                {
                    c.Update(gameTime);
                }
            }
        }