Class Vector3AnimationWorkAction
Works with an action on a single float value.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.WorkActions
Assembly: Evergine.Components.dll
Syntax
public class Vector3AnimationWorkAction : UpdatableWorkAction, IWorkAction
Constructors
Vector3AnimationWorkAction(Entity, Vector3, Vector3, TimeSpan, EaseFunction)
Initializes a new instance of the Vector3AnimationWorkAction class.
Declaration
protected Vector3AnimationWorkAction(Entity entity, Vector3 from, Vector3 to, TimeSpan time, EaseFunction ease)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The entity. |
| Vector3 | from | Initial value. |
| Vector3 | to | End value. |
| TimeSpan | time | The duration of the animation. |
| EaseFunction | ease | Easing function. |
Vector3AnimationWorkAction(Entity, Vector3, Vector3, TimeSpan, EaseFunction, Action<Vector3>)
Initializes a new instance of the Vector3AnimationWorkAction class.
Declaration
public Vector3AnimationWorkAction(Entity entity, Vector3 from, Vector3 to, TimeSpan time, EaseFunction ease, Action<Vector3> updateAction)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The entity. |
| Vector3 | from | Initial value. |
| Vector3 | to | End value. |
| TimeSpan | time | The duration of the animation. |
| EaseFunction | ease | Easing function. |
| Action<Vector3> | updateAction | The action that needs to be updated. |
Fields
from
Initial value.
Declaration
protected Vector3 from
Field Value
| Type | Description |
|---|---|
| Vector3 |
to
End value.
Declaration
protected Vector3 to
Field Value
| Type | Description |
|---|---|
| Vector3 |
updateAction
The update action.
Declaration
protected Action<Vector3> updateAction
Field Value
| Type | Description |
|---|---|
| Action<Vector3> |
Methods
BackInEase(float, Vector3, Vector3, float)
Back in-ease function.
Declaration
public Vector3 BackInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
BackInOutEase(float, Vector3, Vector3, float)
Back in and out ease function.
Declaration
public Vector3 BackInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
BackOutEase(float, Vector3, Vector3, float)
Back out ease function.
Declaration
public Vector3 BackOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
BounceInEase(float, Vector3, Vector3, float)
Bounce in ease function.
Declaration
public Vector3 BounceInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | The current time. |
| Vector3 | b | The start value. |
| Vector3 | c | The end value. |
| float | d | The animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | The delta value. |
BounceInOutEase(float, Vector3, Vector3, float)
Bounce in-out ease function.
Declaration
public Vector3 BounceInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
BounceOutEase(float, Vector3, Vector3, float)
Bounce out ease function.
Declaration
public Vector3 BounceOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
CircleInEase(float, Vector3, Vector3, float)
Circle in ease function.
Declaration
public Vector3 CircleInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
CircleInOutEase(float, Vector3, Vector3, float)
Circle in and out ease function.
Declaration
public Vector3 CircleInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
CircleOutEase(float, Vector3, Vector3, float)
Circle out ease function.
Declaration
public Vector3 CircleOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
CubicInEase(float, Vector3, Vector3, float)
Cubic in ease function.
Declaration
public Vector3 CubicInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
CubicInOutEase(float, Vector3, Vector3, float)
Cubic in and out ease function.
Declaration
public Vector3 CubicInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
CubitOutEase(float, Vector3, Vector3, float)
Cubic out ease function.
Declaration
public Vector3 CubitOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
DeltaFunction(EaseFunction, Vector3, Vector3, float, float)
Delta Function method.
Declaration
public Vector3 DeltaFunction(EaseFunction function, Vector3 from, Vector3 to, float time, float totalTime)
Parameters
| Type | Name | Description |
|---|---|---|
| EaseFunction | function | Function. |
| Vector3 | from | Start value. |
| Vector3 | to | End value. |
| float | time | Current time. |
| float | totalTime | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
ElasticInEase(float, Vector3, Vector3, float)
Elastic in ease function.
Declaration
public Vector3 ElasticInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
ElasticInOutEase(float, Vector3, Vector3, float)
Elastic in and out ease function.
Declaration
public Vector3 ElasticInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
ElasticOutEase(float, Vector3, Vector3, float)
Elastic out ease function.
Declaration
public Vector3 ElasticOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
ExponentialInEase(float, Vector3, Vector3, float)
Exponential in ease function.
Declaration
public Vector3 ExponentialInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
ExponentialInOutEase(float, Vector3, Vector3, float)
Exponential in and out ease function.
Declaration
public Vector3 ExponentialInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
ExponentialOutEase(float, Vector3, Vector3, float)
Exponential out ease function.
Declaration
public Vector3 ExponentialOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
LinearStep(float, Vector3, Vector3, float)
SmoothStep method.
Declaration
public Vector3 LinearStep(float time, Vector3 value1, Vector3 value2, float duration)
Parameters
| Type | Name | Description |
|---|---|---|
| float | time | The time value. |
| Vector3 | value1 | The first value. |
| Vector3 | value2 | The second value. |
| float | duration | The duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Returns a Vector3. |
PerformCancel()
Cancels the work action.
Declaration
protected override void PerformCancel()
Overrides
PerformRun()
On the run.
Declaration
protected override void PerformRun()
Overrides
PerformSkip()
Notifies the skip.
Declaration
protected override bool PerformSkip()
Returns
| Type | Description |
|---|---|
| bool | Whether the action is skipped successfully. |
Overrides
QuadraticInEase(float, Vector3, Vector3, float)
Quadratic in ease function.
Declaration
public Vector3 QuadraticInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuadraticInOutEase(float, Vector3, Vector3, float)
Quadratic in and out ease function.
Declaration
public Vector3 QuadraticInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuadraticOutEase(float, Vector3, Vector3, float)
Quadratic out ease function.
Declaration
public Vector3 QuadraticOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuarticInEase(float, Vector3, Vector3, float)
Quartic in ease function.
Declaration
public Vector3 QuarticInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuarticInOutEase(float, Vector3, Vector3, float)
Quartic in and out ease function.
Declaration
public Vector3 QuarticInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuarticOutEase(float, Vector3, Vector3, float)
Quartic out ease function.
Declaration
public Vector3 QuarticOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuinticInEase(float, Vector3, Vector3, float)
Quintic in ease function.
Declaration
public Vector3 QuinticInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuinticInOutEase(float, Vector3, Vector3, float)
Quintic in-out ease function.
Declaration
public Vector3 QuinticInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
QuinticOutEase(float, Vector3, Vector3, float)
Quintic out ease function.
Declaration
public Vector3 QuinticOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
SineInEase(float, Vector3, Vector3, float)
Sine in ease function.
Declaration
public Vector3 SineInEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
SineInOutEase(float, Vector3, Vector3, float)
Sine in and out ease function.
Declaration
public Vector3 SineInOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | Delta value. |
SineOutEase(float, Vector3, Vector3, float)
Sine out ease function.
Declaration
public Vector3 SineOutEase(float t, Vector3 b, Vector3 c, float d)
Parameters
| Type | Name | Description |
|---|---|---|
| float | t | Current time. |
| Vector3 | b | Start value. |
| Vector3 | c | End value. |
| float | d | Animation duration. |
Returns
| Type | Description |
|---|---|
| Vector3 | 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. |