コード例 #1
0
 void OnDestroy()
 {
     if (I == this)
     {
         I = null;
     }
     this.StopAllCoroutines();
     showTween.Kill();
     bgColorTween.Kill();
     textTween.Kill();
 }
コード例 #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);
     }
 }
コード例 #3
0
        void Awake()
        {
            I = this;
            WalkieTalkie.gameObject.SetActive(true);
            WalkieTalkie.Setup();

            TextUI.isRightToLeftText = true;

            showTween = DOTween.Sequence().SetUpdate(true).SetAutoKill(false).Pause()
                        .Append(this.GetComponent <RectTransform>().DOAnchorPosY(170, 0.3f).From().SetEase(Ease.OutBack))
                        .OnPlay(() => this.gameObject.SetActive(true))
                        .OnRewind(() =>
            {
                TextUI.text = "";
                this.gameObject.SetActive(false);
            });
            bgColorTween = Background.GetComponent <Image>().DOColor(BgNoKeeperColor, 0.3f).SetEase(Ease.Linear)
                           .SetAutoKill(false).Pause();

            clearAndHide();
        }