Class StepAnimator<TObject>.Step
- Namespace
- MLEM.Animations
- Assembly
- MLEM.dll
A step in a StepAnimator<TObject>.
public class StepAnimator<TObject>.Step : GenericDataHolder, IGenericDataHolder
- Inheritance
-
StepAnimator<TObject>.Step
- Implements
- Inherited Members
Constructors
Step(TimeSpan, AnimationFunction)
Creates a new animator step with the given settings.
public Step(TimeSpan time, StepAnimator<TObject>.AnimationFunction animation = null)
Parameters
timeTimeSpanThe time that this step should play for.
animationStepAnimator<TObject>.AnimationFunctionThe animation function that is called every Update(TObject, TimeSpan) while this step is active.
Step(TimeSpan, float, AnimationFunction)
Creates a new animator step with the given settings.
public Step(TimeSpan time, float varianceFactor, StepAnimator<TObject>.AnimationFunction animation = null)
Parameters
timeTimeSpanThe time that this step should play for.
varianceFactorfloatAn optional variance factor, which is used to determine a MinTime and MaxTime by multiplying the
timewith it and subtracting the result from the MinTime and adding the result to the MaxTime.animationStepAnimator<TObject>.AnimationFunctionThe animation function that is called every Update(TObject, TimeSpan) while this step is active.
Step(TimeSpan, TimeSpan, AnimationFunction)
Creates a new animator step with the given settings.
public Step(TimeSpan minTime, TimeSpan maxTime, StepAnimator<TObject>.AnimationFunction animation = null)
Parameters
minTimeTimeSpanThe minimum time that this step should be able to play for. If this is different from
maxTime, a random time between the two is selected each time the step is played.maxTimeTimeSpanThe maximum time that this step should be able to play for. If this is different from
minTime, a random time between the two is selected each time the step is played.animationStepAnimator<TObject>.AnimationFunctionThe animation function that is called every Update(TObject, TimeSpan) while this step is active.
Fields
Animation
The animation function that is called every Update(TObject, TimeSpan) while this step is active.
public StepAnimator<TObject>.AnimationFunction Animation
Field Value
- StepAnimator<TObject>.AnimationFunction
Finished
A function that is called when this step finishes, after the last time Animation is called, or when this step is currently playing while the StepAnimator<TObject> is Reset(TObject).
public Action<StepAnimator<TObject>, StepAnimator<TObject>.Step, TObject> Finished
Field Value
- Action<StepAnimator<TObject>, StepAnimator<TObject>.Step, TObject>
MaxTime
The maximum time that this step should be able to play for. If this is different from MinTime, a random time between the two is selected each time the step is played.
public readonly TimeSpan MaxTime
Field Value
MinTime
The minimum time that this step should be able to play for. If this is different from MaxTime, a random time between the two is selected each time the step is played.
public readonly TimeSpan MinTime
Field Value
Started
A function that is called when this step starts, before the first time Animation is called.
public Action<StepAnimator<TObject>, StepAnimator<TObject>.Step, TObject> Started
Field Value
- Action<StepAnimator<TObject>, StepAnimator<TObject>.Step, TObject>