Пример #1
0
 public void FadeToWhite(float time, bool disableRaycasts = false)
 {
     CheckCanvasGroup();                     gameObject.SetActive(true);
     CanvasGroup.alpha          = 1f;
     CanvasGroup.blocksRaycasts = disableRaycasts;
     _seq = TweenHelper.ReplaceSequence(_seq, false);
     _seq.Append(CanvasGroup.DOFade(0, time));
     _seq.AppendCallback(AfterFadeToWhite);
 }
Пример #2
0
        void Start()
        {
            var rt = GetComponent <RectTransform>();

            _initPos = rt.anchoredPosition;
            _seq     = TweenHelper.ReplaceSequence(_seq);
            _seq.AppendInterval(Random.Range(0, MaxStartDelay));
            _seq.Append(rt.DOAnchorPos(rt.anchoredPosition + Movement, Time));
            _seq.Append(rt.DOAnchorPos(_initPos, Time));
            _seq.SetLoops(-1);
        }
Пример #3
0
 void OnDestroy()
 {
     _seq = TweenHelper.ResetSequence(_seq);
 }