14 [Tooltip(
"The Transform to animate")]
19 [Tooltip(
"The state of the Transform at the start of the animation")]
24 [Tooltip(
"The state of the Transform at the end of the animation")]
33 this.originTransform = origin;
34 this.destinationTransform = destination;
42 public override bool Step(
float deltaTime,
bool inverseIfMirror =
true)
44 bool endOfAnimation = base.Step(deltaTime, inverseIfMirror);
48 return endOfAnimation;
Curve
Predefined curves for the SimpleAnimations
Allows the animation of Transform components.
TransformAnimation(Transform transformToAnimate, Transform destination, Transform origin, float duration=1f, Curve curve=Curve.EaseInOut, WrapMode wrapMode=WrapMode.Once)
override Object GetAnimatedObject(bool displayWarningIfNotApplicable)
Returns the UnityEngine.Object animated. If not applicable, return null.
Transform transformToAnimate
The Transform to animate
Transform destinationTransform
The state of the Transform at the end of the animation
override bool Step(float deltaTime, bool inverseIfMirror=true)
Go forward or backwards in the animation.
Transform originTransform
The state of the Transform 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 timeStamp
The current moment/time of the animation. From 0 to duration.
float duration
How much should the animation last?
AnimationCurve curve
The curve of the animation over time.
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...