コード例 #1
0
        /// <summary>
        /// Shows the screen.
        /// </summary>
        /// <param name="guiScreen">GUI screen.</param>
        public void ShowScreen(ScreenDefinitions definition, UIScreen.Callback theCallback = null)
        {
            //resultCallback = theCallback;
            UIScreen uiScreen = screens.Find(s => s.screenDefinition == definition);

            if (currentGUIScreen != null && uiScreen != currentGUIScreen)
            {
                currentGUIScreen.CloseWindow();
            }

            lastGUIScreen    = currentGUIScreen;
            currentGUIScreen = uiScreen;

            if (currentGUIScreen != null)
            {
                currentGUIScreen.OpenWindow(theCallback);
            }
                        #if UNITY_EDITOR
            else
            {
                Debug.LogError("[CanvasManager in " + name + "]: La guiScreen es null. Quizás no has establecido la primera desde el inspector.");
            }
                        #endif

            //StartCoroutine (AnimationEndProcess ());
        }
コード例 #2
0
 public void ShowScreen(ScreenDefinitions screenDef, UIScreen.Callback TheCallback = null)
 {
     DisableInput();
     if (TheCallback == null)
     {
         TheCallback = EnableInput;
     }
     ScreenManager.Instance.ShowScreen(screenDef, TheCallback);
 }