コード例 #1
0
 public void FadeIn()
 {
     if (ScreenFade)
     {
         ScreenFade.FadeScreenIn();
     }
 }
コード例 #2
0
        public IEnumerator Load(string name, LoadMode mode)
        {
            Scene scene = Array.Find(scenes, s => s.name == name);

            if (scene == null)
            {
                yield return(null);
            }

            switch (mode)
            {
            case LoadMode.Single:
                UnloadAllScenes();

                while (!allScenesUnloaded)
                {
                    yield return(new WaitForEndOfFrame());
                }

                scene.Load();
                break;

            case LoadMode.Additive:
                scene.Load();
                break;
            }

            if (!loadedScenes.Contains(name))
            {
                loadedScenes.Add(name);
            }

            activeScene = name;

            if (scene.fadeIn)
            {
                screenFade.FadeScreenIn();
            }

            StageScene(scene);

            print("scene " + scene.name + " has been loaded.");
        }
コード例 #3
0
        IEnumerator ShowOnlyFadeOn(string name)
        {
            UIScreen targetScreen = Array.Find(screens, s => s.name == name);

            if (targetScreen == null)
            {
                yield return(null);
            }

            HideAllScreensFadeOn();

            while (!allScreensHidden)
            {
                yield return(new WaitForEndOfFrame());
            }

            targetScreen.Show();

            currentScreenIndex = Array.FindIndex(screens, s => s.name == name);

            screenFade.FadeScreenIn();
        }