public void FadeIn() { if (ScreenFade) { ScreenFade.FadeScreenIn(); } }
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."); }
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(); }