Exemplo n.º 1
0
    private void OnBlackFullEvent()
    {
        if (preScreen != null)
        {
            preScreen.CloseScreen();
            preScreen = null;
        }

        if (screenSwitchingTo != null)
        {
            screenSwitchingTo.OpenScreen();
            screenSwitchingTo = null;
        }
    }
Exemplo n.º 2
0
    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;
            }
        }
    }