Ejemplo n.º 1
0
        protected TweenSimulator(IList <IValueProvider <TValue> > providers, TValue endValue, float duration, ISimulateFunction function, TweenEndValueType tweenEndValueType)
        {
            this.providers         = new ReadOnlyCollection <IValueProvider <TValue> >(providers);
            this.endValue          = endValue;
            this.duration          = duration;
            this.function          = function;
            this.tweenEndValueType = tweenEndValueType;

            this.shifts       = new TValue[this.providers.Count];
            this.previosValue = new TValue[this.providers.Count];
        }
Ejemplo n.º 2
0
 public SpriteFillTween(object obj, float endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(obj, endValue, duration, function, TweenType.FillAmount, endValueType, callback)
 {
 }
Ejemplo n.º 3
0
 public SizeTween(object obj, Vector2 endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(obj, endValue, duration, function, TweenType.Size2D, endValueType, callback)
 {
 }
Ejemplo n.º 4
0
 public CameraOrthoSizeTween(object obj, float endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(obj, endValue, duration, function, TweenType.CameraOrthoSize, endValueType, callback)
 {
 }
Ejemplo n.º 5
0
 public static MoveRectPositionTween Play(object obj, Vector2 endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
 {
     return((MoveRectPositionTween)(new MoveRectPositionTween(obj, endValue, duration, function, endValueType, callback)).PlayAndReturnSelf());
 }
Ejemplo n.º 6
0
        private readonly new Vector3 endValue; //TODO: Тут не было new.

        #region Constructors
        public QuaternionTweenSimulator(object obj, Vector3 endValue, float duration, ISimulateFunction function, TweenType tweenType)
            : this(GetProviders(obj, tweenType), endValue, duration, function)
        {
        }
Ejemplo n.º 7
0
 public FloatTweenSimulator(IList <IValueProvider <float> > providers, float endValue, float duration, ISimulateFunction function, TweenEndValueType tweenEndValueType)
     : base(providers, endValue, duration, function, tweenEndValueType)
 {
 }
Ejemplo n.º 8
0
 public AlphaTween(object obj, float endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(obj, endValue, duration, function, TweenType.Alpha, endValueType, callback)
 {
 }
Ejemplo n.º 9
0
 public Vector2Tween(object obj, Vector2 endValue, float duration, ISimulateFunction function, TweenType tweenType = TweenType.Undefined, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(new Vector2TweenSimulator(obj, endValue, duration, function, tweenType, endValueType), duration, null, callback)
 {
     this.endValue     = endValue;
     this.endValueType = endValueType;
 }
Ejemplo n.º 10
0
 public MoveByCurveTween(AbstractCurve curve, object obj, float duration, ISimulateFunction function, TweenSpace space = TweenSpace.Global, Callback callback = null)
     : base(new CurveTweenSimulator(curve, obj, duration, function, TweenPerformer.GetShiftTypeBySpace(space)), duration, null, callback)
 {
 }
Ejemplo n.º 11
0
 public ShortestRotationTween(Transform obj, Vector3 endValue, float duration, ISimulateFunction function, TweenSpace space)
     : base(
         obj, getAngles(space == TweenSpace.Global? obj.eulerAngles : obj.localEulerAngles, endValue), duration, function,
         TweenPerformer.GetShortestRotationBySpace(space), TweenEndValueType.Shift, null)
 {
 }
Ejemplo n.º 12
0
 public ColorTween(object obj, Color endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(new ColorTweenSimulator(obj, endValue, duration, function, TweenType.Color, endValueType), duration, null, callback)
 {
     this.endValue     = endValue;
     this.endValueType = endValueType;
 }
Ejemplo n.º 13
0
 public static MoveTween Play(object obj, Vector3 endValue, float duration, ISimulateFunction function, TweenSpace space = TweenSpace.Global, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
 {
     return((MoveTween)(new MoveTween(obj, endValue, duration, function, space, endValueType, callback)).PlayAndReturnSelf());
 }
Ejemplo n.º 14
0
 public MoveTween(object obj, Vector3 endValue, float duration, ISimulateFunction function, TweenSpace space = TweenSpace.Global, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(obj, endValue, duration, function, TweenPerformer.GetShiftTypeBySpace(space), endValueType, callback)
 {
 }
Ejemplo n.º 15
0
 public CurveTweenSimulator(AbstractCurve curve, object obj, float duration, ISimulateFunction function, TweenType tweenType)
     : this(curve, GetProviders(obj, tweenType), duration, function)
 {
 }
Ejemplo n.º 16
0
 public CurveTweenSimulator(AbstractCurve curve, IList <IValueProvider <Vector3> > providers, float duration, ISimulateFunction function)
     : base(providers, Vector3.zero, duration, function, TweenEndValueType.To)
 {
     this.curve = curve;
 }
Ejemplo n.º 17
0
 public Vector2TweenSimulator(IList <IValueProvider <Vector2> > providers, Vector2 endValue, float duration, ISimulateFunction function, TweenEndValueType tweenEndValueType)
     : base(providers, endValue, duration, function, tweenEndValueType)
 {
 }
Ejemplo n.º 18
0
 public static AlphaTween Play(object obj, float endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
 {
     return((AlphaTween)(new AlphaTween(obj, endValue, duration, function, endValueType, callback)).PlayAndReturnSelf());
 }
Ejemplo n.º 19
0
 public RotationTween(object obj, Vector3 shiftValue, float duration, ISimulateFunction function, TweenSpace tweenSpace = TweenSpace.Global, Callback callback = null)
     : base(new QuaternionTweenSimulator(obj, shiftValue, duration, function, tweenSpace == TweenSpace.Global ? TweenType.Rotation : TweenType.RotationLocal), duration, null, callback)
 {
     this.shiftValue = shiftValue;
 }
Ejemplo n.º 20
0
 public FloatTweenSimulator(object obj, float endValue, float duration, ISimulateFunction function, TweenType tweenType, TweenEndValueType tweenEndValueType)
     : this(GetProviders(obj, tweenType), endValue, duration, function, tweenEndValueType)
 {
 }
Ejemplo n.º 21
0
 public static RotationTween Play(object obj, Vector3 shiftValue, float duration, ISimulateFunction function, TweenSpace space = TweenSpace.Global, Callback callback = null)
 {
     return((RotationTween)(new RotationTween(obj, shiftValue, duration, function, space, callback)).PlayAndReturnSelf());
 }
Ejemplo n.º 22
0
 public QuaternionTweenSimulator(IList <IValueProvider <Quaternion> > providers, Vector3 endValue, float duration, ISimulateFunction function)
     : base(providers, Quaternion.identity, duration, function, TweenEndValueType.Shift)
 {
     this.endValue     = endValue;
     floatShifts       = new Vector3[providers.Count];
     floatPreviosValue = new Vector3[providers.Count];
 }
Ejemplo n.º 23
0
 public MoveRectPositionTween(object obj, Vector2 endValue, float duration, ISimulateFunction function, TweenEndValueType endValueType = TweenEndValueType.To, Callback callback = null)
     : base(obj, endValue, duration, function, TweenType.MoveRectPosition, endValueType, callback)
 {
 }