コード例 #1
0
 protected override void Awake()
 {
     base.Awake();
     if (RectTrans == null)
     {
         return;
     }
     animator = RectTrans.GetComponent <Animator>();
 }
コード例 #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;
            }
        }
コード例 #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);
            }
        }
コード例 #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);
            }
        }