Ejemplo n.º 1
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()));
        }