Class Vector2AnimationWorkAction
Works with a single float value.
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 | Animation duration. |
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 that 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.
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 | Starting value. |
Vector2 | c | Ending 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 ease-in 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)
SmoothStep 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()
Runs.
Declaration
protected override void PerformRun()
Overrides
PerformSkip()
Notifies the skip.
Declaration
protected override bool PerformSkip()
Returns
Type | Description |
---|---|
bool | Indicates 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 game time. |