private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
        {
            //start scene intro if there is one available
            string            nameOfScene = scene.name;
            SceneIntroduction intro       = asset.GetSceneIntroduction(nameOfScene);
            MinigameSystem    system      = MinigameSystem.Instance;

            if (intro != null && !(system.IsGameScene(nameOfScene) && system.GetSetting(nameOfScene).MinigameMode))
            {
                intro.Start();
            }
        }
Esempio n. 2
0
        /// <summary>Returns a scene introduction object with given name</summary>
        public SceneIntroduction GetSceneIntroduction(string nameOfScene)
        {
            for (int i = 0; i < introductions.Length; i++)
            {
                SceneIntroduction intro = introductions[i] as SceneIntroduction;
                if (intro != null && !intro.Finished && intro.NameOfScene == nameOfScene)
                {
                    return(intro);
                }
            }

            return(null);
        }