Exemplo n.º 1
0
        public static Tweener <Color, ColorHelper> DoAlpha(this Text target, float endValue, float duration, bool scalable = true)
        {
            Color destColor = target.color;

            destColor.a = endValue;

            return(TweenMgr.To(() => target.color
                               , x => { target.color = x; }
                               , destColor, duration, scalable));
        }
Exemplo n.º 2
0
 public void DoLoop(LoopStyle loopStyle)
 {
     if (loopStyle == LoopStyle.Yoyo)
     {
         _tweener._EaseType   = TweenMgr.GetInvEaseType(_tweener._EaseType);
         _tweener._FromValue  = _tweener._FromValue + _tweener._DeltaValue;
         _tweener._DeltaValue = -_tweener._DeltaValue;
     }
     else if (loopStyle == LoopStyle.Restart)
     {
         _property.SetValue(_tweener._FromValue);
     }
     else if (loopStyle == LoopStyle.Incremental)
     {
         _tweener._FromValue = _tweener._FromValue + _tweener._DeltaValue;
     }
 }
Exemplo n.º 3
0
 public void DoRelease()
 {
     _tweener._Reset();
     TweenMgr._FreeColorTweener(_tweener);
 }
Exemplo n.º 4
0
 public void DoRelease()
 {
     _tweener._Reset();
     TweenMgr._FreeVector2Tweener(_tweener);
 }
Exemplo n.º 5
0
 public void DoRelease()
 {
     _tweener._Reset();
     TweenMgr._FreeFloatTweener(_tweener);
 }
Exemplo n.º 6
0
 public static Tweener <Vector2, _V2Helper> DoAnchorPos(this RectTransform target, Vector2 endValue, float duration, bool scalable = true)
 {
     return(TweenMgr.To(() => target.anchoredPosition, x => target.anchoredPosition = x, endValue, duration, scalable));
 }
Exemplo n.º 7
0
 public static Tweener <Vector3, _V3Helper> DoScale(this Image target, Vector3 endValue, float duration, bool scalable = true)
 {
     return(TweenMgr.To(() => target.transform.localScale, x => target.transform.localScale = x, endValue, duration, scalable));
 }
Exemplo n.º 8
0
 public static Tweener <Vector2, _V2Helper> DoSize(this Image target, Vector2 endValue, float duration, bool scalable = true)
 {
     return(TweenMgr.To(() => target.rectTransform.sizeDelta, x => target.rectTransform.sizeDelta = x, endValue, duration, scalable));
 }
Exemplo n.º 9
0
 public static Tweener <Vector3, _V3Helper> DoMove(this Transform target, Vector3 endValue, float duration, bool scalable = true)
 {
     return(TweenMgr.To(() => target.transform.position, x => target.transform.position = x, endValue, duration, scalable));
 }
Exemplo n.º 10
0
 ///---
 public static Tweener <Color, ColorHelper> DoColor(this SpriteRenderer target, Color endValue, float duration, bool scalable = true)
 {
     return(TweenMgr.To(() => target.color
                        , x => { target.color = x; }
                        , endValue, duration, scalable));
 }