Example #1
0
        private IEnumerator StartPhase()
        {
            // Make sure the Outro UI is not being shown and the intro UI is.
            StartCoroutine(m_UIController.ShowIntroUI());
            StartCoroutine(m_UIController.HideOutroUI());

            m_CameraContainer.transform.position = new Vector3(0, 0, 0);

            // To make sure the user is facing the right way show the arrows.
            m_GuiArrows.Show();

            // Turn off the fog whilst showing the intro.
            RenderSettings.fog = false;

            // Make sure the game is stopped for the flyer's health.
            m_HealthController.StopGame();

            // Since a selection slider is being used, hide the radial and show the reticle.
            m_SelectionSlider.gameObject.SetActive(true);
            m_SelectionRadial.Hide();
            m_Reticle.Show();
            m_FlyerMovementController.m_Speed = 70f;
            m_flyerPlayership.SetActive(false);



            // The user should hold Fire1 for the selection slider so turn on warnings for tapping.
            m_InputWarnings.TurnOnDoubleTapWarnings();
            m_InputWarnings.TurnOnSingleTapWarnings();

            // In order wait for the selection slider to fill, then the intro UI to hide, then the camera to fade out.
            yield return(StartCoroutine(m_SelectionSlider.WaitForBarToFill()));

            yield return(StartCoroutine(m_UIController.HideIntroUI()));

            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(m_IntroOutroFadeDuration, false)));

            // Once the screen has faded out, we can hide UI elements we don't want to see anymore like the arrows and reticle.
            m_GuiArrows.Hide();
            m_Reticle.Hide();

            // Turn the fog back on so spawned objects won't appear suddenly.
            RenderSettings.fog = true;

            // The user now needs to tap to fire so turn off the warnings.
            m_InputWarnings.TurnOffDoubleTapWarnings();
            m_InputWarnings.TurnOffSingleTapWarnings();

            // Now wait for the screen to fade back in.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(m_IntroOutroFadeDuration, false)));
        }
Example #2
0
        private IEnumerator StartPhase()
        {
            // Make sure the Outro UI is not being shown and the intro UI is.
            StartCoroutine(m_UIController.ShowIntroUI());
            StartCoroutine(m_UIController.HideOutroUI());

            // To make sure the user is facing the right way show the arrows.
            m_GuiArrows.Show();

            // Turn off the fog whilst showing the intro.
            RenderSettings.fog = false;

            // Make sure the game is stopped for the flyer's health.
            m_HealthController.StopGame();

            // Since a selection slider is being used, hide the radial and show the reticle.
            m_SelectionRadial.Hide();
            m_Reticle.Show();

            // In order wait for the selection slider to fill, then the intro UI to hide, then the camera to fade out.
            yield return(StartCoroutine(m_SelectionSlider.WaitForBarToFill()));

            yield return(StartCoroutine(m_UIController.HideIntroUI()));

            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(m_IntroOutroFadeDuration, false)));

            // Once the screen has faded out, we can hide UI elements we don't want to see anymore like the arrows and reticle.
            m_GuiArrows.Hide();
            m_Reticle.Hide();

            // Turn the fog back on so spawned objects won't appear suddenly.
            RenderSettings.fog = true;

            // Now wait for the screen to fade back in.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(m_IntroOutroFadeDuration, false)));
        }
Example #3
0
 private IEnumerator StartPhase()
 {
     m_HealthController.StopGame();
     yield return(null);
 }