Пример #1
0
        public static void Show(NavigationWindow template, string text, NavigationWindow.Alignment align)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object)template, (UnityEngine.Object)null))
            {
                return;
            }
            if (NavigationWindow.mNumNavigations == 0)
            {
                NavigationWindow.mNavigationCanvas = new GameObject("NavigationCanvas", new System.Type[2]
                {
                    typeof(Canvas),
                    typeof(SRPG_CanvasScaler)
                });
                Canvas component = (Canvas)NavigationWindow.mNavigationCanvas.GetComponent <Canvas>();
                component.set_renderMode((RenderMode)0);
                component.set_sortingOrder(5000);
                UnityEngine.Object.DontDestroyOnLoad((UnityEngine.Object)NavigationWindow.mNavigationCanvas);
            }
            NavigationWindow navigationWindow = (NavigationWindow)UnityEngine.Object.Instantiate <NavigationWindow>((M0)template);

            navigationWindow.SetAlignment(align);
            navigationWindow.SetText(text);
            ((Component)navigationWindow).get_transform().SetParent(NavigationWindow.mNavigationCanvas.get_transform(), false);
            ++NavigationWindow.mNumNavigations;
        }
Пример #2
0
 public static void DiscardByTxt(string text)
 {
     if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)NavigationWindow.mCurrent, (UnityEngine.Object)null) || !(NavigationWindow.mCurrent.Text.get_text() == text))
     {
         return;
     }
     NavigationWindow.DiscardCurrent();
 }
Пример #3
0
 public static void DiscardCurrent()
 {
     if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)NavigationWindow.mCurrent, (UnityEngine.Object)null))
     {
         return;
     }
     UnityEngine.Object.Destroy((UnityEngine.Object)((Component)NavigationWindow.mCurrent).get_gameObject(), NavigationWindow.mCurrent.DestroyDelay);
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object)NavigationWindow.mCurrent.mAnimator, (UnityEngine.Object)null) && !string.IsNullOrEmpty(NavigationWindow.mCurrent.HideTrigger))
     {
         NavigationWindow.mCurrent.mAnimator.SetTrigger(NavigationWindow.mCurrent.HideTrigger);
     }
     NavigationWindow.mCurrent = (NavigationWindow)null;
 }
Пример #4
0
 private void Start()
 {
     NavigationWindow.DiscardCurrent();
     NavigationWindow.mCurrent = this;
 }