Exemplo n.º 1
0
        private IEnumerator EndPhase()
        {
            m_FlyerMovementController.m_Speed = 70f;

            // Wait for the camera to fade out.
            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(m_IntroOutroFadeDuration, false)));

            // Show the required UI like the arrows and the radial.
            m_GuiArrows.Show();
            m_SelectionRadial.Show();

            m_CameraRender.postProcessMaterial.SetFloat("_ColorThreshold", 0f);

            // Turn off the fog.
            RenderSettings.fog = false;


            // Show the outro UI.
            StartCoroutine(m_UIController.ShowOutroUI());

            // Start the game audio.
            foreach (var audioEvent in m_AudioEventArray)
            {
                audioEvent.GetComponent <AudioSource>().Stop();
            }

            m_SwimAudioEvent.Stop();

            // Stop the various controllers.
            m_AlignmentChecker.StopGame();
            m_HealthController.StopGame();
            m_FlyerMovementController.StopGame();
            m_FlyerLaserController.StopGame();
            m_EnvironmentController.StopEnvironment();
            Debug.Log("END");

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

            // The user needs to fill the radial to continue so turn the tap warnings back on.
            m_InputWarnings.TurnOnDoubleTapWarnings();
            m_InputWarnings.TurnOnSingleTapWarnings();

            // In order, wait for the screen to fade in, then wait for the user to fill the radial.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(m_IntroOutroFadeDuration, false)));

            yield return(StartCoroutine(m_SelectionRadial.WaitForSelectionRadialToFill()));

            // Turn the warnings off now the user has filled the radial.
            m_InputWarnings.TurnOffDoubleTapWarnings();
            m_InputWarnings.TurnOffSingleTapWarnings();

            // Hide the arrows.
            m_GuiArrows.Hide();

            // Wait for the outro UI to hide.
            yield return(StartCoroutine(m_UIController.HideOutroUI()));

            // Turn the fog back on.
            RenderSettings.fog = true;
        }
Exemplo n.º 2
0
        private IEnumerator EndPhase()
        {
            // Wait for the camera to fade out.
            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(m_IntroOutroFadeDuration, false)));

            // Show the required UI like the arrows and the radial.
            m_GuiArrows.Show();
            m_SelectionRadial.Show();

            // Turn off the fog.
            RenderSettings.fog = false;

            // Show the outro UI.
            StartCoroutine(m_UIController.ShowOutroUI());

            // Stop the various controllers.
            m_AlignmentChecker.StopGame();
            m_HealthController.StopGame();
            m_FlyerMovementController.StopGame();
            m_EnvironmentController.StopEnvironment();

            // In order, wait for the screen to fade in, then wait for the user to fill the radial.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(m_IntroOutroFadeDuration, false)));

            yield return(StartCoroutine(m_SelectionRadial.WaitForSelectionRadialToFill()));

            // Hide the arrows.
            m_GuiArrows.Hide();

            // Wait for the outro UI to hide.
            yield return(StartCoroutine(m_UIController.HideOutroUI()));

            // Turn the fog back on.
            RenderSettings.fog = true;
        }
Exemplo n.º 3
0
        private IEnumerator EndPhase()
        {
            if (m_EyeRaycaster != null)
            {
                m_EyeRaycaster.ShowLineRenderer = true;
            }
            // Hide the reticle since the radial is about to be used.
            m_Reticle.Hide();

            // In order, wait for the outro UI to fade in then wait for an additional delay.
            yield return(StartCoroutine(m_UIController.ShowOutroUI()));

            yield return(new WaitForSeconds(m_EndDelay));

            // Turn on the tap warnings.
            m_InputWarnings.TurnOnDoubleTapWarnings();
            m_InputWarnings.TurnOnSingleTapWarnings();

            // Wait for the radial to fill (this will show and hide the radial automatically).
            yield return(StartCoroutine(m_SelectionRadial.WaitForSelectionRadialToFill()));

            // The radial is now filled so stop the warnings.
            m_InputWarnings.TurnOffDoubleTapWarnings();
            m_InputWarnings.TurnOffSingleTapWarnings();

            // Wait for the outro UI to fade out.
            yield return(StartCoroutine(m_UIController.HideOutroUI()));
        }
Exemplo n.º 4
0
    private IEnumerator EndPhase()
    {
        yield return(StartCoroutine(uiController.ShowOutroUI()));

        yield return(new WaitForSeconds(endDelay));

        yield return(StartCoroutine(selectionRadial.WaitForSelectionRadialToFill()));

        yield return(StartCoroutine(uiController.HideOutroUI()));
    }
Exemplo n.º 5
0
        private IEnumerator EndPhase()
        {
            // Turn off the ability to set targets for the character.
            m_MazeTargetSetting.Deactivate();

            // Hide the reticle as it's not required at the moment.
            m_Reticle.Hide();

            // The reticle also controls the rotation for the selection radial so set it to use default rotation.
            m_Reticle.UseNormal = false;

            // Hide the destination marker as targets are no longer being set.
            m_DestinationMarker.Hide();

            // If the player won...
            if (m_Win)
            {
                // ... play the win particles and audio.
                m_WinParticles.Play(true);
                m_GameOverAudioSource.Play();

                // Wait for the particles to finish.
                yield return(new WaitForSeconds(m_WinParticles.main.duration));

                // Wait for the win UI to fade in.
                yield return(StartCoroutine(m_WinFader.InteruptAndFadeIn()));
            }
            else
            {
                // If the player didn't win wait for the lose UI to fade in.
                yield return(StartCoroutine(m_LoseFader.InteruptAndFadeIn()));
            }

            // The user needs to hold Fire1 to pass the UI so turn on double tap warnings.
            m_InputWarnings.TurnOnDoubleTapWarnings();

            // Wait for the radial to fill.
            yield return(StartCoroutine(m_SelectionRadial.WaitForSelectionRadialToFill()));

            // Turn the tap warnings back off.
            m_InputWarnings.TurnOffDoubleTapWarnings();

            // In order wait for the win and lose UI to fade out (only one should be faded in) then wait for the camera to fade out.
            yield return(StartCoroutine(m_WinFader.InteruptAndFadeOut()));

            yield return(StartCoroutine(m_LoseFader.InteruptAndFadeOut()));

            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(true)));

            // Restart all the dependent scripts.
            Restart();

            // Wait for the screen tot fade back in.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(true)));
        }
Exemplo n.º 6
0
        private IEnumerator EndPhase()
        {
            if (m_EyeRaycaster != null)
            {
                m_EyeRaycaster.ShowLineRenderer = true;
            }

            // Wait for the camera to fade out.
            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(m_IntroOutroFadeDuration, false)));

            // Show the required UI like the arrows and the radial.
            m_GuiArrows.Show();
            m_SelectionRadial.Show();

            // Turn off the fog.
            RenderSettings.fog = false;

            // Show the outro UI.
            StartCoroutine(m_UIController.ShowOutroUI());

            // Stop the various controllers.
            m_AlignmentChecker.StopGame();
            m_HealthController.StopGame();
            m_FlyerMovementController.StopGame();
            m_EnvironmentController.StopEnvironment();

            // The user needs to fill the radial to continue so turn the tap warnings back on.
            m_InputWarnings.TurnOnDoubleTapWarnings();
            m_InputWarnings.TurnOnSingleTapWarnings();

            // In order, wait for the screen to fade in, then wait for the user to fill the radial.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(m_IntroOutroFadeDuration, false)));

            yield return(StartCoroutine(m_SelectionRadial.WaitForSelectionRadialToFill()));

            // Turn the warnings off now the user has filled the radial.
            m_InputWarnings.TurnOffDoubleTapWarnings();
            m_InputWarnings.TurnOffSingleTapWarnings();

            // Hide the arrows.
            m_GuiArrows.Hide();

            // Wait for the outro UI to hide.
            yield return(StartCoroutine(m_UIController.HideOutroUI()));

            // Turn the fog back on.
            RenderSettings.fog = true;
        }
Exemplo n.º 7
0
        private IEnumerator EndPhase()
        {
            //replace selection radial to the center of the field
            //  m_SelectionRadial.moveToPosition(originalradialposition);

            // In order, wait for the outro UI to fade in then wait for an additional delay.
            yield return(StartCoroutine(m_UIController.ShowOutroUI()));

            yield return(new WaitForSeconds(m_EndDelay));

            // Wait for the radial to fill (this will show and hide the radial automatically).
            yield return(StartCoroutine(m_SelectionRadial.WaitForSelectionRadialToFill()));

            // Wait for the outro UI to fade out.
            yield return(StartCoroutine(m_UIController.HideOutroUI()));
        }
Exemplo n.º 8
0
        private IEnumerator PlayPhase()
        {
            // Wait for the UI on the player's gun to fade in.
            yield return(StartCoroutine(m_UIController.ShowPlayerUI()));

            IsPlaying = true;
            m_reticle.Show();

            // Reset the score.
            SessionData.Restart();

            if (m_tutorial)
            {
                for (int i = 0; i < m_pathWalker.StopPoints.Count; i++)
                {
                    m_stepTutorial = -1;
                    yield return(StartCoroutine(m_pathWalker.PlayUpdate()));

                    if (i == 0)
                    {
                        m_stepTutorial = 0;
                        IsPlaying      = false;
                        yield return(StartCoroutine(m_UIController.ShowEnemiesUI()));

                        yield return(StartCoroutine(m_selectionRadial.WaitForSelectionRadialToFill()));

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

                        IsPlaying = true;
                    }
                    else if (i == 1)
                    {
                        m_stepTutorial = 1;
                        IsPlaying      = false;
                        yield return(StartCoroutine(m_UIController.ShowHealthUI()));

                        yield return(StartCoroutine(m_selectionRadial.WaitForSelectionRadialToFill()));

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

                        IsPlaying = true;
                    }
                    else if (i == 2)
                    {
                        m_stepTutorial = 2;
                        IsPlaying      = false;
                        yield return(StartCoroutine(m_UIController.ShowOtherEnemiesUI()));

                        yield return(StartCoroutine(m_selectionRadial.WaitForSelectionRadialToFill()));

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

                        IsPlaying = true;
                    }
                }
            }
            else
            {
                for (int i = 0; i < m_pathWalker.StopPoints.Count; i++)
                {
                    yield return(StartCoroutine(m_pathWalker.PlayUpdate()));
                }
            }

            //gun UI fade out
            yield return(StartCoroutine(m_UIController.HidePlayerUI()));
        }