14 [Tooltip(
"The animated float")]
19 [Tooltip(
"The float at the start of the animation")]
24 [Tooltip(
"The float at the end of the animation")]
33 this.originFloat = origin;
34 this.destinationFloat = destination;
42 public override bool Step(
float deltaTime,
bool inverseIfMirror =
true)
44 bool endOfAnimation = base.Step(deltaTime, inverseIfMirror);
48 return endOfAnimation;
53 if (displayWarningIfNotApplicable)
54 Debug.LogWarning(
"Trying to obtain the animated object from a FloatAnimation. This action is not supported. Access the 'floatToAnimate' instead.");
Curve
Predefined curves for the SimpleAnimations
Allows the animation of a float.
float destinationFloat
The float at the end of the animation
FloatAnimation(float floatToAnimate, float destination, float origin, float duration=1f, Curve curve=Curve.EaseInOut, WrapMode wrapMode=WrapMode.Once)
float floatToAnimate
The animated float
override bool Step(float deltaTime, bool inverseIfMirror=true)
Go forward or backwards in the animation.
override Object GetAnimatedObject(bool displayWarningIfNotApplicable)
Returns the UnityEngine.Object animated. If not applicable, return null.
float originFloat
The float at the start of the animation
Base class to create simple animations of any element.
WrapMode
How the animation behaves once finished. Should be executed only once? Start over?...
float duration
How much should the animation last?
AnimationCurve curve
The curve of the animation over time.
float currentAnimationCurveValue
The value of the animation at the current time. 0 means start state. 1 means end state.
WrapMode wrapMode
Determines how the animation behaves once finished. Should be executed only once? Start over?...
static AnimationCurve GetCurve(Curve curve)
Obtains the desired type of animation curve with a duration of 1 (starting on 0), the start value bei...