Esempio n. 1
0
        public override void Play(bool playForward)
        {
            base.Play(playForward);

            CachedMaskableGraphic.color = From;

            this.m_uiTweener = CachedMaskableGraphic.DOColor(To, Duration);
            PlayInternal();
        }
Esempio n. 2
0
        public override void Play(bool playForward)
        {
            base.Play(playForward);

            //当同时有CanvasGroup和Image时,TweenAlpha使用CanvasGroup
            if (m_cachedCanvasGroup)
            {
                m_cachedCanvasGroup.alpha = From;
                this.m_uiTweener          = m_cachedCanvasGroup.DOFade(To, Duration);
            }
            else if (CachedMaskableGraphic)
            {
                Color currentColor = CachedMaskableGraphic.color;
                Color fromColor    = new Color(currentColor.r, currentColor.g, currentColor.b, From);
                CachedMaskableGraphic.color = fromColor;
                this.m_uiTweener            = CachedMaskableGraphic.DOFade(To, Duration);
            }

            PlayInternal();
        }