Table of Contents

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

time TimeSpan

The time that this step should play for.

animation StepAnimator<TObject>.AnimationFunction

The 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

time TimeSpan

The time that this step should play for.

varianceFactor float

An optional variance factor, which is used to determine a MinTime and MaxTime by multiplying the time with it and subtracting the result from the MinTime and adding the result to the MaxTime.

animation StepAnimator<TObject>.AnimationFunction

The 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

minTime TimeSpan

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.

maxTime TimeSpan

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.

animation StepAnimator<TObject>.AnimationFunction

The 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

TimeSpan

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

TimeSpan

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>