private void OnBlackFullEvent() { if (preScreen != null) { preScreen.CloseScreen(); preScreen = null; } if (screenSwitchingTo != null) { screenSwitchingTo.OpenScreen(); screenSwitchingTo = null; } }
public void SwitchSceneContext(ContextScreens sceneToShow) { ContextScreen currentScene = null; sceneSwitcher.FakeSwitchScreen(); for (int i = 0; i < allContextScreens.Length; i++) { currentScene = allContextScreens[i]; if (!currentScene.IsOpened && currentScene.IsContextScreen(sceneToShow)) { screenSwitchingTo = currentScene; } if (currentScene.IsOpened && !currentScene.IsContextScreen(sceneToShow)) { preScreen = currentScene; } } }