Esempio n. 1
0
        private void ReturnToMainMenu(List <Person> people, GameplayManager gameplayManager, PlayerInput playerInput, PresentManager presentManager)
        {
            newspaperIntro    = true;
            newspaperScale    = 0.0f;
            newspaperRotation = 0.0f;

            people.Clear(); //destroy all people
            gameplayManager.ResetGameplayVariables();
            playerInput.ResetSlappers();
            presentManager.ResetPresents();
            GameState.ResetGameState();
            //GameState.ProgressGameplayState();
        }
Esempio n. 2
0
        public void Update(GameTime gameTime, List <Person> people, GameplayManager gameplayManager, PlayerInput playerInput, PresentManager presentManager)
        {
            if (Keyboard.GetState().IsKeyDown(Keys.Back))
            {
                ReturnToMainMenu(people, gameplayManager, playerInput, presentManager);
            }

            if (textSizeIncreasing)
            {
                textScale += 0.01f;
            }
            else
            {
                textScale -= 0.01f;
            }


            if (textSizeIncreasing && textScale >= MAX_TEXT_SCALE)
            {
                textSizeIncreasing = false;
            }
            else if (!textSizeIncreasing && textScale <= MIN_TEXT_SCALE)
            {
                textSizeIncreasing = true;
            }


            if (newspaperIntro)
            {
                newspaperScale    += 0.01f * 4;
                newspaperRotation += 0.019f * 4;

                if (newspaperRotation >= 1.9f)
                {
                    newspaperScale    = 1.0f;
                    newspaperRotation = 1.9f;
                    newspaperIntro    = false;
                }
            }
        }