Пример #1
0
        //Finish Animation Sequence
        IEnumerator LevelComplete()
        {
            m_Animator.Play("LevelComplete");

            if (m_CameraController != null)
            {
                m_CameraController.SetLevelCompleteCamera();
            }

            //Wait for the LevelComplete UI Animation
            yield return(new WaitForSeconds(m_AnimationClipsLength["LevelComplete"]));

            if (m_NextLevelName != "")
            {
                Application.LoadLevel(m_NextLevelName);
            }
            else
            {
                Debug.Log("Assign the var 'NextLevelName' of the component 'GameManager.cs' to load a next level.");
            }
        }