示例#1
0
 public PositionInterpolator(int animationFrameDuration, Vector3 start, Vector3 end,
                             [NotNull] InterpolationFunction.InterpolationFunction function,
                             [NotNull] Transform transform)
 {
     this.transform     = transform;
     vectorInterpolator = new VectorInterpolator(start, end, animationFrameDuration, function);
 }
示例#2
0
 public FrameBasedInterpolator(float startValue, float endValue, int frames,
                               InterpolationFunction.InterpolationFunction interpolationFunc) : base(startValue, endValue,
                                                                                                     interpolationFunc)
 {
     this.frames  = frames;
     currentFrame = 0;
 }
 public VectorInterpolator(Vector3 start, Vector3 end, int animationFrameDuration,
                           [NotNull] InterpolationFunction.InterpolationFunction interpolator)
 {
     this.animationFrameDuration = animationFrameDuration;
     interpolationState          =
         new InterpolationStateManager(start, end, new VectorInterpolationFunction(interpolator));
     // have the animation start at, well, the start.
     CurrentValue = interpolationState.Start;
 }
 public VectorInterpolationFunction(InterpolationFunction.InterpolationFunction interpolationFunction)
 {
     this.interpolationFunction = interpolationFunction;
 }