Class AdditiveAnimation<T>
- java.lang.Object
-
- at.wirecube.additiveanimations.additive_animator.AdditiveAnimation<T>
-
public class AdditiveAnimation<T> extends Object
This class is public for subclasses of AdditiveAnimator only, and should not be used outside of that.
-
-
Constructor Summary
Constructors Constructor Description AdditiveAnimation(T target, Property<T,Float> property, float startValue, float targetValue)The preferred constructor to use when animating properties.AdditiveAnimation(T target, Property<T,Float> property, float startValue, Path path, PathEvaluator.PathMode pathMode, PathEvaluator sharedEvaluator)AdditiveAnimation(T target, String tag, float startValue, float targetValue)Use this constructor for custom properties that have no simple getter or setter.AdditiveAnimation(T target, String tag, float startValue, Path path, PathEvaluator.PathMode pathMode, PathEvaluator sharedEvaluator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdditiveAnimation<T>cloneWithTarget(T target, Float startValue)booleanequals(Object o)floatevaluateAt(float progress)at.wirecube.additiveanimations.additive_animator.AccumulatedAnimationValuegetAccumulatedValue()AnimationState<T>getAssociatedAnimationState()floatgetByValue()TypeEvaluatorgetCustomTypeEvaluator()PathgetPath()Property<T,Float>getProperty()floatgetStartValue()StringgetTag()TgetTarget()floatgetTargetValue()inthashCode()booleanisBy()voidsetAccumulatedValue(at.wirecube.additiveanimations.additive_animator.AccumulatedAnimationValue av)voidsetAssociatedAnimationState(AnimationState<T> associatedAnimationStateId)voidsetBy(boolean by)Set this immediately after creating the animation.voidsetCustomInterpolator(TimeInterpolator customInterpolator)voidsetCustomTypeEvaluator(TypeEvaluator<Float> evaluator)voidsetStartValue(float startValue)voidsetTargetValue(float targetValue)
-
-
-
Constructor Detail
-
AdditiveAnimation
public AdditiveAnimation(T target, Property<T,Float> property, float startValue, float targetValue)
The preferred constructor to use when animating properties. If you use this constructor, you don't need to worry about the logic to apply the changes. This is taken care of by using the Setter provided by `property`.
-
AdditiveAnimation
public AdditiveAnimation(T target, String tag, float startValue, float targetValue)
Use this constructor for custom properties that have no simple getter or setter.- Parameters:
tag- Name of the animated property. Must be unique.startValue- Start value of the animated property.targetValue- Target value of the animated property.
-
AdditiveAnimation
public AdditiveAnimation(T target, String tag, float startValue, Path path, PathEvaluator.PathMode pathMode, PathEvaluator sharedEvaluator)
-
AdditiveAnimation
public AdditiveAnimation(T target, Property<T,Float> property, float startValue, Path path, PathEvaluator.PathMode pathMode, PathEvaluator sharedEvaluator)
-
-
Method Detail
-
setAccumulatedValue
public void setAccumulatedValue(at.wirecube.additiveanimations.additive_animator.AccumulatedAnimationValue av)
-
getTag
public String getTag()
-
getStartValue
public float getStartValue()
-
getTargetValue
public float getTargetValue()
-
setStartValue
public void setStartValue(float startValue)
-
setTargetValue
public void setTargetValue(float targetValue)
-
setCustomTypeEvaluator
public void setCustomTypeEvaluator(TypeEvaluator<Float> evaluator)
-
getCustomTypeEvaluator
public TypeEvaluator getCustomTypeEvaluator()
-
getTarget
public T getTarget()
-
setBy
public void setBy(boolean by)
Set this immediately after creating the animation. Failure to do so will result in incorrect target values.
-
isBy
public boolean isBy()
-
getByValue
public float getByValue()
-
getPath
public Path getPath()
-
setCustomInterpolator
public void setCustomInterpolator(TimeInterpolator customInterpolator)
-
evaluateAt
public float evaluateAt(float progress)
-
getAccumulatedValue
public at.wirecube.additiveanimations.additive_animator.AccumulatedAnimationValue getAccumulatedValue()
-
cloneWithTarget
public AdditiveAnimation<T> cloneWithTarget(T target, Float startValue)
-
setAssociatedAnimationState
public void setAssociatedAnimationState(AnimationState<T> associatedAnimationStateId)
-
getAssociatedAnimationState
public AnimationState<T> getAssociatedAnimationState()
-
-