14 [Tooltip(
"The animated color")]
19 [Tooltip(
"The color at the start of the animation")]
24 [Tooltip(
"The color at the end of the animation")]
34 this.originColor = origin;
35 this.destinationColor = destination;
43 public override bool Step(
float deltaTime,
bool inverseIfMirror =
true)
45 bool endOfAnimation = base.Step(deltaTime, inverseIfMirror);
49 return endOfAnimation;
54 if (displayWarningIfNotApplicable)
55 Debug.LogWarning(
"Trying to obtain the animated object from a ColorAnimation. This action is not supported. Access the 'colorToAnimate' instead.");
Curve
Predefined curves for the SimpleAnimations
Allows the animation of a Color.
Color colorToAnimate
The animated color
Color originColor
The color at the start of the animation
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.
ColorAnimation(Color colorToAnimate, Color destination, Color origin, float duration=1f, Curve curve=Curve.EaseInOut, WrapMode wrapMode=WrapMode.Once)
Color destinationColor
The color at the end 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...