Class Vector2AnimationWorkAction
Work action of a single float value.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.WorkActions
Assembly: Evergine.Components.dll
Syntax
public class Vector2AnimationWorkAction : UpdatableWorkAction, IWorkAction
Constructors
Vector2AnimationWorkAction(Entity, Vector2, Vector2, TimeSpan, EaseFunction)
Initializes a new instance of the Vector2AnimationWorkAction class.
Declaration
protected Vector2AnimationWorkAction(Entity entity, Vector2 from, Vector2 to, TimeSpan time, EaseFunction ease)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
Vector2 | from | Initial value. |
Vector2 | to | End value. |
TimeSpan | time | The time of the animation. |
EaseFunction | ease | Easing function. |
Vector2AnimationWorkAction(Entity, Vector2, Vector2, TimeSpan, EaseFunction, Action<Vector2>)
Initializes a new instance of the Vector2AnimationWorkAction class.
Declaration
public Vector2AnimationWorkAction(Entity entity, Vector2 from, Vector2 to, TimeSpan time, EaseFunction ease, Action<Vector2> updateAction)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
Vector2 | from | Initial value. |
Vector2 | to | End value. |
TimeSpan | time | The time of the animation. |
EaseFunction | ease | Easing function. |
Action<Vector2> | updateAction | The action when needs to be updated. |
Fields
from
Initial value.
Declaration
protected Vector2 from
Field Value
Type | Description |
---|---|
Vector2 |
to
End value.
Declaration
protected Vector2 to
Field Value
Type | Description |
---|---|
Vector2 |
updateAction
The update action of the.
Declaration
protected Action<Vector2> updateAction
Field Value
Type | Description |
---|---|
Action<Vector2> |
Methods
BackInEase(float, Vector2, Vector2, float)
Back in ease function.
Declaration
public Vector2 BackInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
BackInOutEase(float, Vector2, Vector2, float)
Back in and out ease function.
Declaration
public Vector2 BackInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
BackOutEase(float, Vector2, Vector2, float)
Back out ease function.
Declaration
public Vector2 BackOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
BounceInEase(float, Vector2, Vector2, float)
Bounce in ease function.
Declaration
public Vector2 BounceInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
BounceInOutEase(float, Vector2, Vector2, float)
Bounce in out ease function.
Declaration
public Vector2 BounceInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
BounceOutEase(float, Vector2, Vector2, float)
Bounce out ease function.
Declaration
public Vector2 BounceOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
CircleInEase(float, Vector2, Vector2, float)
Circle in ease function.
Declaration
public Vector2 CircleInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
CircleInOutEase(float, Vector2, Vector2, float)
Circle in and out ease function.
Declaration
public Vector2 CircleInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
CircleOutEase(float, Vector2, Vector2, float)
Circle out ease function.
Declaration
public Vector2 CircleOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
CubicInEase(float, Vector2, Vector2, float)
Cubic in ease function.
Declaration
public Vector2 CubicInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
CubicInOutEase(float, Vector2, Vector2, float)
Cubic in and out ease function.
Declaration
public Vector2 CubicInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
CubicOutEase(float, Vector2, Vector2, float)
Cubic out Ease function.
Declaration
public Vector2 CubicOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
DeltaFunction(EaseFunction, Vector2, Vector2, float, float)
Delta Function method.
Declaration
public Vector2 DeltaFunction(EaseFunction function, Vector2 from, Vector2 to, float time, float totalTime)
Parameters
Type | Name | Description |
---|---|---|
EaseFunction | function | ease function. |
Vector2 | from | Start value. |
Vector2 | to | End value. |
float | time | Current time. |
float | totalTime | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | Delta value. |
ElasticInEase(float, Vector2, Vector2, float)
Elastic in ease function.
Declaration
public Vector2 ElasticInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
ElasticInOutEase(float, Vector2, Vector2, float)
Elastic in and out ease function.
Declaration
public Vector2 ElasticInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
ElasticOutEase(float, Vector2, Vector2, float)
Elastic out ease function.
Declaration
public Vector2 ElasticOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
ExponentialInEase(float, Vector2, Vector2, float)
Exponential in ease function.
Declaration
public Vector2 ExponentialInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
ExponentialInOutEase(float, Vector2, Vector2, float)
Exponential in and out ease function.
Declaration
public Vector2 ExponentialInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
ExponentialOutEase(float, Vector2, Vector2, float)
Exponential out ease function.
Declaration
public Vector2 ExponentialOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
LinearStep(float, Vector2, Vector2, float)
Smooth Step method.
Declaration
public Vector2 LinearStep(float time, Vector2 value1, Vector2 value2, float duration)
Parameters
Type | Name | Description |
---|---|---|
float | time | Current time. |
Vector2 | value1 | Start value. |
Vector2 | value2 | End value. |
float | duration | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta 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, Vector2, Vector2, float)
Quadratic in ease function.
Declaration
public Vector2 QuadraticInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuadraticInOutEase(float, Vector2, Vector2, float)
Quadratic in and out ease function.
Declaration
public Vector2 QuadraticInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuadraticOutEase(float, Vector2, Vector2, float)
Quadratic out ease function.
Declaration
public Vector2 QuadraticOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuarticInEase(float, Vector2, Vector2, float)
Quartic in ease function.
Declaration
public Vector2 QuarticInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuarticInOutEase(float, Vector2, Vector2, float)
Quartic in and out ease function.
Declaration
public Vector2 QuarticInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuarticOutEase(float, Vector2, Vector2, float)
Quartic out ease function.
Declaration
public Vector2 QuarticOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuinticInEase(float, Vector2, Vector2, float)
Quintic in ease function.
Declaration
public Vector2 QuinticInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuinticInOutEase(float, Vector2, Vector2, float)
Quintic in and out ease function.
Declaration
public Vector2 QuinticInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
QuinticOutEase(float, Vector2, Vector2, float)
Quintic out ease function.
Declaration
public Vector2 QuinticOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
SineInEase(float, Vector2, Vector2, float)
Sine in ease function.
Declaration
public Vector2 SineInEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
SineInOutEase(float, Vector2, Vector2, float)
Sine in and out ease function.
Declaration
public Vector2 SineInOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | delta value. |
SineOutEase(float, Vector2, Vector2, float)
Sine out ease function.
Declaration
public Vector2 SineOutEase(float t, Vector2 b, Vector2 c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | t | Current time. |
Vector2 | b | Start value. |
Vector2 | c | End value. |
float | d | Animation duration. |
Returns
Type | Description |
---|---|
Vector2 | 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. |