Exemplo n.º 1
0
        void Awake()
        {
            I = this;

            if (ActivateTheseOnAwake != null)
            {
                foreach (GameObject go in ActivateTheseOnAwake)
                {
                    go.SetActive(true);
                }
            }

            showTween = this.GetComponent <RectTransform>().DOAnchorPosY(-800, 0.5f).From().SetUpdate(timeIndependent)
                        .SetEase(Ease.OutBack).SetAutoKill(false).Pause()
                        .OnPlay(() => this.gameObject.SetActive(true))
                        .OnRewind(() => this.gameObject.SetActive(false));

            this.gameObject.SetActive(false);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Immediately clears the GlobalUI elements
 /// </summary>
 /// <param name="includeSceneTransitioner">If TRUE (default) also clears the sceneTransitioner, otherwise not</param>
 public static void Clear(bool includeSceneTransitioner = true)
 {
     if (includeSceneTransitioner && SceneTransitioner != null)
     {
         SceneTransitioner.CloseImmediate();
     }
     if (ContinueScreen != null)
     {
         ContinueScreen.Close(true);
     }
     if (WidgetPopupWindow != null)
     {
         WidgetPopupWindow.Close(true);
     }
     if (WidgetSubtitles != null)
     {
         WidgetSubtitles.Close(true);
     }
 }