Class FloatAnimationWorkAction
Work action of a single float value.
Implements
Inherited Members
Namespace: Evergine.Components.WorkActions
Assembly: Evergine.Components.dll
Syntax
public class FloatAnimationWorkAction : UpdatableWorkAction, IWorkAction
Constructors
FloatAnimationWorkAction(Entity, float, float, TimeSpan, EaseFunction)
Initializes a new instance of the FloatAnimationWorkAction class.
Declaration
protected FloatAnimationWorkAction(Entity entity, float from, float to, TimeSpan time, EaseFunction ease)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
float | from | Initial value. |
float | to | End value. |
TimeSpan | time | The time of the animation. |
EaseFunction | ease | Easing function. |
FloatAnimationWorkAction(Entity, float, float, TimeSpan, EaseFunction, Action<float>)
Initializes a new instance of the FloatAnimationWorkAction class.
Declaration
public FloatAnimationWorkAction(Entity entity, float from, float to, TimeSpan time, EaseFunction ease, Action<float> updateAction)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
float | from | Initial value. |
float | to | End value. |
TimeSpan | time | The time of the animation. |
EaseFunction | ease | Easing function. |
Action<float> | updateAction | The action when needs to be updated. |
Fields
from
Initial value.
Declaration
protected float from
Field Value
Type | Description |
---|---|
float |
to
End value.
Declaration
protected float to
Field Value
Type | Description |
---|---|
float |
updateAction
The update action of the.
Declaration
protected Action<float> updateAction
Field Value
Type | Description |
---|---|
Action<float> |
Methods
BackInEase(float, float, float, float)
Back in ease function.
Declaration
public float BackInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
BackInOutEase(float, float, float, float)
Back in and out ease function.
Declaration
public float BackInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
BackOutEase(float, float, float, float)
Back out ease function.
Declaration
public float BackOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
BounceInEase(float, float, float, float)
Bounce in ease function.
Declaration
public float BounceInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
BounceInOutEase(float, float, float, float)
Bounce in and out ease function.
Declaration
public float BounceInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
BounceOutEase(float, float, float, float)
Bounce out ease function.
Declaration
public float BounceOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
CircleInEase(float, float, float, float)
Circle in ease function.
Declaration
public float CircleInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
CircleInOutEase(float, float, float, float)
Circle in and out ease function.
Declaration
public float CircleInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
CircleOutEase(float, float, float, float)
Circle out ease function.
Declaration
public float CircleOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
CubicInEase(float, float, float, float)
Cubic in ease function.
Declaration
public float CubicInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
CubicInOutEase(float, float, float, float)
Cubic in and out ease function.
Declaration
public float CubicInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
CubicOutEase(float, float, float, float)
Cubic out ease function.
Declaration
public float CubicOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
DeltaFunction(EaseFunction, float, float, float, float)
Delta Function method.
Declaration
public float DeltaFunction(EaseFunction function, float from, float to, float time, float totalTime)
Parameters
Type | Name | Description |
---|---|---|
EaseFunction | function | function. |
float | from | Start value. |
float | to | End value. |
float | time | Current time. |
float | totalTime | Animation duration. |
Returns
Type | Description |
---|---|
float | Delta value. |
ElasticInEase(float, float, float, float)
Elastic in ease function.
Declaration
public float ElasticInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
ElasticInOutEase(float, float, float, float)
Elastic in and out ease function.
Declaration
public float ElasticInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
ElasticOutEase(float, float, float, float)
Elastic out ease function.
Declaration
public float ElasticOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
ExponentialInEase(float, float, float, float)
Exponential in ease function.
Declaration
public float ExponentialInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
ExponentialInOutEase(float, float, float, float)
Exponential in and out ease function.
Declaration
public float ExponentialInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
ExponentialOutEase(float, float, float, float)
Exponential out ease function.
Declaration
public float ExponentialOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
LinearStep(float, float, float)
Smooth Step method.
Declaration
public float LinearStep(float from, float to, float lerp)
Parameters
Type | Name | Description |
---|---|---|
float | from | Initial value. |
float | to | End value. |
float | lerp | The lerp value. |
Returns
Type | Description |
---|---|
float | The desired value. |
PerformCancel()
Cancels the work action.
Declaration
protected override void PerformCancel()
Overrides
PerformRun()
Ons the run.
Declaration
protected override void PerformRun()
Overrides
PerformSkip()
Notifies the skip.
Declaration
protected override bool PerformSkip()
Returns
Type | Description |
---|---|
bool | If the action is skipped successfully. |
Overrides
QuadraticInEase(float, float, float, float)
Quadratic in ease function.
Declaration
public float QuadraticInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuadraticInOutEase(float, float, float, float)
Quadratic in and out ease function.
Declaration
public float QuadraticInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuadraticOutEase(float, float, float, float)
Quadratic out ease function.
Declaration
public float QuadraticOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuarticInEase(float, float, float, float)
Quartic in ease function.
Declaration
public float QuarticInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuarticInOutEase(float, float, float, float)
Quartic in and out ease function.
Declaration
public float QuarticInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuarticOutEase(float, float, float, float)
Quartic out ease function.
Declaration
public float QuarticOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuinticInEase(float, float, float, float)
Quintic in ease function.
Declaration
public float QuinticInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuinticInOutEase(float, float, float, float)
Quintic in and out ease function.
Declaration
public float QuinticInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
QuinticOutEase(float, float, float, float)
Quintic out ease function.
Declaration
public float QuinticOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
SineInEase(float, float, float, float)
Sine in ease function.
Declaration
public float SineInEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
SineInOutEase(float, float, float, float)
Sine in and out ease function.
Declaration
public float SineInOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
SineOutEase(float, float, float, float)
Sine out ease function.
Declaration
public float SineOutEase(float t, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
float | b | Start value. |
float | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
float | delta value. |
Update(TimeSpan)
Updates the single work action.
Declaration
public override void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The elapsed gameTime. |