Beispiel #1
0
        /// <summary>
        /// Gos to game level I.
        /// </summary>
        /// <returns>The to game level I.</returns>
        /// <param name="levelName">Level name.</param>
        protected virtual IEnumerator GoToGameLevelIE(string levelName)
        {
            if (Time.timeScale > 0.0f)
            {
                yield return(new WaitForSeconds(OutroFadeDuration));
            }
            GameManager.Instance.UnPauseGame();

            if (string.IsNullOrEmpty(levelName))
            {
                LoadingSceneManager.LoadGameScene("StartScreen");
            }
            else
            {
                LoadingSceneManager.LoadGameScene(levelName);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Loads the level specified in parameters
 /// </summary>
 public virtual void GoToLevel()
 {
     LoadingSceneManager.LoadGameScene(TargetLevelName);
 }