Ejemplo n.º 1
0
 protected override void Awake()
 {
     base.Awake();
     if (RectTrans == null)
     {
         return;
     }
     animator = RectTrans.GetComponent <Animator>();
 }
Ejemplo n.º 2
0
        //private TweenerCore<float,> colorTween;

        protected override void Awake()
        {
            base.Awake();
            if (RectTrans != null)
            {
                CanvasGroup = RectTrans.GetComponent <CanvasGroup>();
                //if (CanvasGroup != null)
                //    CanvasGroup.alpha = From;
            }
        }
Ejemplo n.º 3
0
        public override void OnShow(bool b, bool isActiveByShow)
        {
            base.OnShow(b, isActiveByShow);
            if (RectTrans != null)
            {
                if (CanvasGroup == null)
                {
                    CanvasGroup = RectTrans.GetComponent <CanvasGroup>();
                }

                if (IsReset)
                {
                    CanvasGroup.alpha = b?From:To;
                }

                tweener = DOTween.To(() => CanvasGroup.alpha, x => CanvasGroup.alpha = x, b ? To : From, Duration).SetEase(GetEase(b)).OnComplete(OnTweenComplete).SetDelay(Delay);
            }
        }
Ejemplo n.º 4
0
        public override void OnShow(bool b)
        {
            base.OnShow(b);
            if (RectTrans != null)
            {
                if (Graphic == null)
                {
                    Graphic = RectTrans.GetComponent <Graphic>();
                }

                if (IsReset)
                {
                    Color.a = b ? From : To;
                }
                tweener = DOTween.To(() => Color.a, x => Color.a = x, b ? To : From, Duration)
                          .SetEase(GetEase(b))
                          .OnComplete(OnTweenComplete)
                          .SetDelay(Delay)
                          .OnUpdate(OnAlphaTweenUpdate)
                          .OnStart(OnAlpahTweenStart);
            }
        }