-
Notifications
You must be signed in to change notification settings - Fork 0
Class Reference
This page is brought to you by Vsxmd.
Contents #
- AnimationPlayer
- AnimBuilder
- AnimControllerComp
- AnimResource
- CallbackProvider
- CustomComponentUpdate
- EllipseMovement
- IAnimPiece
- LerpNoiseMovement
- PathFollowMovement
- PathVisualizer
- ProceduralAnimationCorePlugin
- Rotate
- SimpleColor
- SimpleMovement
- TrigonometricMovement2D
- Utils
- Wait
MFEP.Duality.Plugins.Animation
Loads and plays AnimResources on the GameObject. Manages the animation's state, and provides interface to control it (Play, Pause, Stop).
The AnimResource that is played. Default is null
Wheter the animation starts at staring the game/sandbox. Default is false
Wheter the animation is currently playing or is stopped. Settable.
Wheter the animation starts from the beginning when reached its end. Default is false
The current animation progress. Between 0 and 1. Readonly for now.
The original length of the AnimResource multiplied by PlaybackRate
The relative speed the animation is playing back. Default is 1f
MFEP.Duality.Plugins.Animation
Use this class to build the animation in your AnimResources. Supports fluent syntax.
Adds a single AnimPiece to the animation chain.
Name | Type | Description |
---|---|---|
piece | MFEP.Duality.Plugins.Animation.IAnimPiece | The IAnimPiece to add. |
time | System.Single | The time (seconds) this AnimPiece takes to finish. |
Adds an array of AnimPieces that will play simultaneously.
Name | Type | Description |
---|---|---|
pieces | MFEP.Duality.Plugins.Animation.IAnimPiece[] | |
time | System.Single | Time (seconds) these pieces will take to finish. |
Starting point of the animation chain.
This method has no parameters.
MFEP.Duality.Plugins.Animation.Extras
Can control the animation state of the attached GameObject's AnimationPlayer.
MFEP.Duality.Plugins.Animation
Inherit from this class when creating custom AnimResources. Have to implement the InitializePieces method.
MFEP.Duality.Plugins.Animation.AnimPieces
Use this AnimPiece to implement custom behaviour in the AnimResource.
This function is going to be called at every update, getting the current AnimPercent and the AnimationPlayer GameObject as argument. Default does nothing.
MFEP.Duality.Plugins.Animation.AnimPieces
This AnimPiece invokes the AnimTickCallback function on every Component which implements ICmpAnimUpdatable on the AnimationPlayer's GameObject.
MFEP.Duality.Plugins.Animation.AnimPieces
Moves the gameObject on an elliptical arc. This path can be a circle/ellipse/circular arc depending on the parameters.
The ending phase angle on the path in radians. Default is 0f
The size of the path ellipse on the X axis. Default is 200f
RadiusX's multiplier function. Default is Const1
The size of the path ellipse on the Y axis. Default is 200f
RadiusY's multiplier function. Default is Const1
Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true
The starting phase angle on the path in radians. Determines the starting point on the arc. 0 means the most right point, Pi/2 is the bottom one, and so along. Default is 0f
MFEP.Duality.Plugins.Animation
Building block of the animations. Initialize runs at the start of the animation. Tick runs at every update.
MFEP.Duality.Plugins.Animation.AnimPieces
Implements random movement based on a simple noise algorithm. The Direction attribute controls the direction of the movement.
The noise amplitude, the strength of this effect. Default is 100f
real_Amplitude := Amplitude * AmplitudeGen (currentAnimPercent) Default is ExponentialDecr
Controls the direction of the random movement. Its length is indifferent, will be normalized. Default is Vector2.UnitX
The frequency of the direction changes. Default is 10f
real_frequency := Frequency * FreqencyGen (currentAnimPercent) Default is Const1
Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true
MFEP.Duality.Plugins.Animation.AnimPieces
Moves the animated GameObject along a preinitialized path. The path consists of the segments between the PathVertices.
If set to true, the algorithm automaticallt generates one more segment between the first and last vertex. Default is false
If set to false, running every segment takes the same time, the segments' length does not count. Otherwise, the speeed will be constant. Default is true
TODO
MUST BE DECLARED. The local coordinates of the path the animation will follow. Default is null
Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true
TODO
MFEP.Duality.Plugins.Animation.Extras
Draws a line that connects the GameObject's positions in the last n frame. Beware! Not very effective.
Color of the line drawn.
How many frames' positions should connect. Don't set this too high.
MFEP.Duality.Plugins.Animation
Defines a Duality core plugin.
MFEP.Duality.Plugins.Animation.AnimPieces
Simple rotating AnimPiece.
The rotation frequency. 1f means one rotation over the animation. Default is 1f
The mapping of the angular movement. Default value is Unity
Wheter this Piece's effect overrides all other rotation. Default is true
MFEP.Duality.Plugins.Animation.AnimPieces
Simple color interpolating AnimPiece.
Color interpolating function. Default is Unity
Color at animation end. Default is ColorRgba.White
Color at animation start. Default is ColorRgba.Black
MFEP.Duality.Plugins.Animation.AnimPieces
Move the GameObject on the line between StartPos and EndPos.
Final position of the animation. Local space. Default is Vector2.Zero
Position interpolation function. Default is Unity
Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true
Starting position of the animation. Local space. Default is Vector2.Zero
MFEP.Duality.Plugins.Animation.AnimPieces
Provides more advanced controls over the trigonometric functions which move the gameObject. Simpler version is EllipseMovement. Consists of two trigonometric expression: one in the X, one in the Y direction.
Amplitude multiplier function in the X direction. Default is Const1
Amplitude multiplier function in the Y direction. Default is Const1
The magnitude of the movement in X and Y direction. Default is Vector2 (200f, 200f)
Frequency multiplier function in the X direction. Default is Const1
Frequency multiplier function in the Y direction. Default is Const1
The 'speed' of the trigonometric functions in the X and Y directions. The frequency of 1 means one period over the animation. Default is Vector2.One
The phase of the trigonometric expression in X and Y direction. Default is Vector2.Zero
Phase multiplier function in the X direction.
Phase multiplier function in the Y direction.
Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true
MFEP.Duality.Plugins.Animation
f(x) = |cos(2πx)|
f(x) = |sin(2πx)|
f(x) = 1
f(x) = cos(2πx)
f(x) = sin(2πx)
f(x) = 3x^2 - 2x^3
f(x) = x
f(x) = c
Name | Type | Description |
---|---|---|
constValue | System.Single | c |
f(x) = cos(2πfx + φ) + c
Name | Type | Description |
---|---|---|
freq | System.Single | f |
amp | System.Single | A |
phase | System.Single | φ |
offset | System.Single | c |
f(x) = - (e^(sx) - 1) / (e^s - 1) + 1
Name | Type | Description |
---|---|---|
slope | System.Single | s |
f(x) = (e^(sx) - 1) / (e^s - 1)
Name | Type | Description |
---|---|---|
slope | System.Single | s |
f(x) = ax + b
Name | Type | Description |
---|---|---|
multiplier | System.Single | a |
offset | System.Single | b |
f(x) = x^n
Name | Type | Description |
---|---|---|
exponent | System.Single | n |
f(x) = sin(2πfx + φ) + c
Name | Type | Description |
---|---|---|
freq | System.Single | f |
amp | System.Single | A |
phase | System.Single | φ |
offset | System.Single | c |
MFEP.Duality.Plugins.Animation.AnimPieces
Does not do anything during the animation. Useful to introduce waiting times between two animation blocks.