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); }
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; }