Esempio n. 1
0
 public ChainItem(T destination, float duration, EaseFunc scaleFunc, TweenAccessors <T> accessors,
                  LerpFunc <T> lerp)
 {
     this.destination = destination;
     this.duration    = duration;
     this.scaleFunc   = scaleFunc;
     this.accessors   = accessors;
     this.lerpFunc    = lerp;
     this.tween       = new Tween <T>(this.lerpFunc);
 }
Esempio n. 2
0
 public TweenChain AppendPointTween(Point targetVal, float duration, EaseFunc easeFunc,
                                    TweenAccessors <Point> accessors)
 {
     return(Append(new ChainItem <Point>(targetVal, duration, easeFunc, accessors, TweenChain.PointLerp)));
 }
Esempio n. 3
0
 public TweenChain AppendVectorTween(Vector2 targetVal, float duration, EaseFunc easeFunc,
                                     TweenAccessors <Vector2> accessors)
 {
     return(Append(new ChainItem <Vector2>(targetVal, duration, easeFunc, accessors, Vector2.Lerp)));
 }
Esempio n. 4
0
 public TweenChain AppendIntTween(int targetVal, float duration, EaseFunc easeFunc,
                                  TweenAccessors <int> accessors)
 {
     return(Append(new ChainItem <int>(targetVal, duration, easeFunc, accessors, TweenChain.LerpInt)));
 }
Esempio n. 5
0
        /*
         * This would work if we had a way to obtain a LerpFunction for a type
         * public TweenChain Append<T>(T targetVal, float duration, EaseFunc easeFunc, TweenAccessors<T> accessors) where T : struct
         * {
         *  return Append(new ChainItem<T>(targetVal, duration, easeFunc, accessors, GetLerpFunction<T>()));
         * }
         */

        public TweenChain AppendFloatTween(float targetVal, float duration, EaseFunc easeFunc,
                                           TweenAccessors <float> accessors)
        {
            return(Append(new ChainItem <float>(targetVal, duration, easeFunc, accessors, FloatTween.LerpFloat)));
        }