Skip to content

Class Reference

mfep edited this page Oct 18, 2016 · 2 revisions

This page is brought to you by Vsxmd.

Contents #

AnimationPlugin.core # =

AnimationPlayer # =

Namespace

MFEP.Duality.Plugins.Animation

Summary

Loads and plays AnimResources on the GameObject. Manages the animation's state, and provides interface to control it (Play, Pause, Stop).

Animation property # =

Summary

The AnimResource that is played. Default is null

AutoPlay property # =

Summary

Wheter the animation starts at staring the game/sandbox. Default is false

IsPlaying property # =

Summary

Wheter the animation is currently playing or is stopped. Settable.

Looping property # =

Summary

Wheter the animation starts from the beginning when reached its end. Default is false

Percent property # =

Summary

The current animation progress. Between 0 and 1. Readonly for now.

PlaybackLength property # =

Summary

The original length of the AnimResource multiplied by PlaybackRate

PlaybackRate property # =

Summary

The relative speed the animation is playing back. Default is 1f

AnimBuilder # =

Namespace

MFEP.Duality.Plugins.Animation

Summary

Use this class to build the animation in your AnimResources. Supports fluent syntax.

Add(piece,time) method # =

Summary

Adds a single AnimPiece to the animation chain.

Returns
Parameters
Name Type Description
piece MFEP.Duality.Plugins.Animation.IAnimPiece The IAnimPiece to add.
time System.Single The time (seconds) this AnimPiece takes to finish.

Add(pieces,time) method # =

Summary

Adds an array of AnimPieces that will play simultaneously.

Returns
Parameters
Name Type Description
pieces MFEP.Duality.Plugins.Animation.IAnimPiece[]
time System.Single Time (seconds) these pieces will take to finish.

Start() method # =

Summary

Starting point of the animation chain.

Returns
Parameters

This method has no parameters.

AnimControllerComp # =

Namespace

MFEP.Duality.Plugins.Animation.Extras

Summary

Can control the animation state of the attached GameObject's AnimationPlayer.

AnimResource # =

Namespace

MFEP.Duality.Plugins.Animation

Summary

Inherit from this class when creating custom AnimResources. Have to implement the InitializePieces method.

CallbackProvider # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Use this AnimPiece to implement custom behaviour in the AnimResource.

Callback property # =

Summary

This function is going to be called at every update, getting the current AnimPercent and the AnimationPlayer GameObject as argument. Default does nothing.

CustomComponentUpdate # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

This AnimPiece invokes the AnimTickCallback function on every Component which implements ICmpAnimUpdatable on the AnimationPlayer's GameObject.

EllipseMovement # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Moves the gameObject on an elliptical arc. This path can be a circle/ellipse/circular arc depending on the parameters.

EndPhase property # =

Summary

The ending phase angle on the path in radians. Default is 0f

RadiusX property # =

Summary

The size of the path ellipse on the X axis. Default is 200f

RadiusXGen property # =

Summary

RadiusX's multiplier function. Default is Const1

RadiusY property # =

Summary

The size of the path ellipse on the Y axis. Default is 200f

RadiusYGen property # =

Summary

RadiusY's multiplier function. Default is Const1

Relative property # =

Summary

Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true

StartPhase property # =

Summary

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

IAnimPiece # =

Namespace

MFEP.Duality.Plugins.Animation

Summary

Building block of the animations. Initialize runs at the start of the animation. Tick runs at every update.

LerpNoiseMovement # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Implements random movement based on a simple noise algorithm. The Direction attribute controls the direction of the movement.

Amplitude property # =

Summary

The noise amplitude, the strength of this effect. Default is 100f

AmplitudeGen property # =

Summary

real_Amplitude := Amplitude * AmplitudeGen (currentAnimPercent) Default is ExponentialDecr

Direction property # =

Summary

Controls the direction of the random movement. Its length is indifferent, will be normalized. Default is Vector2.UnitX

Frequency property # =

Summary

The frequency of the direction changes. Default is 10f

FrequencyGen property # =

Summary

real_frequency := Frequency * FreqencyGen (currentAnimPercent) Default is Const1

Relative property # =

Summary

Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true

PathFollowMovement # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Moves the animated GameObject along a preinitialized path. The path consists of the segments between the PathVertices.

Closed property # =

Summary

If set to true, the algorithm automaticallt generates one more segment between the first and last vertex. Default is false

ConstantVelocity property # =

Summary

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

OverSpeedGen property # =

Summary

TODO

PathVertices property # =

Summary

MUST BE DECLARED. The local coordinates of the path the animation will follow. Default is null

Relative property # =

Summary

Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true

SegmentSpeedGen property # =

Summary

TODO

PathVisualizer # =

Namespace

MFEP.Duality.Plugins.Animation.Extras

Summary

Draws a line that connects the GameObject's positions in the last n frame. Beware! Not very effective.

Color property # =

Summary

Color of the line drawn.

FollowedFrames property # =

Summary

How many frames' positions should connect. Don't set this too high.

ProceduralAnimationCorePlugin # =

Namespace

MFEP.Duality.Plugins.Animation

Summary

Defines a Duality core plugin.

Rotate # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Simple rotating AnimPiece.

Frequency property # =

Summary

The rotation frequency. 1f means one rotation over the animation. Default is 1f

FrequencyGen property # =

Summary

The mapping of the angular movement. Default value is Unity

Relative property # =

Summary

Wheter this Piece's effect overrides all other rotation. Default is true

SimpleColor # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Simple color interpolating AnimPiece.

ColorGen property # =

Summary

Color interpolating function. Default is Unity

EndColor property # =

Summary

Color at animation end. Default is ColorRgba.White

StartColor property # =

Summary

Color at animation start. Default is ColorRgba.Black

SimpleMovement # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Move the GameObject on the line between StartPos and EndPos.

EndPos property # =

Summary

Final position of the animation. Local space. Default is Vector2.Zero

PosGen property # =

Summary

Position interpolation function. Default is Unity

Relative property # =

Summary

Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true

StartPos property # =

Summary

Starting position of the animation. Local space. Default is Vector2.Zero

TrigonometricMovement2D # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

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.

AmpGenX property # =

Summary

Amplitude multiplier function in the X direction. Default is Const1

AmpGenY property # =

Summary

Amplitude multiplier function in the Y direction. Default is Const1

Amplitude property # =

Summary

The magnitude of the movement in X and Y direction. Default is Vector2 (200f, 200f)

FreqGenX property # =

Summary

Frequency multiplier function in the X direction. Default is Const1

FreqGenY property # =

Summary

Frequency multiplier function in the Y direction. Default is Const1

Frequency property # =

Summary

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

Phase property # =

Summary

The phase of the trigonometric expression in X and Y direction. Default is Vector2.Zero

PhaseGenX property # =

Summary

Phase multiplier function in the X direction.

PhaseGenY property # =

Summary

Phase multiplier function in the Y direction.

Relative property # =

Summary

Wheter the movement is combineable with other movement. Even if false, the movement takes place in local space. Default is true

Utils # =

Namespace

MFEP.Duality.Plugins.Animation

AbsCos property # =

Summary

f(x) = |cos(2πx)|

AbsSin property # =

Summary

f(x) = |sin(2πx)|

Const1 property # =

Summary

f(x) = 1

SimpleCos property # =

Summary

f(x) = cos(2πx)

SimpleSin property # =

Summary

f(x) = sin(2πx)

SmoothStep property # =

Summary

f(x) = 3x^2 - 2x^3

Unity property # =

Summary

f(x) = x

Const(constValue) method # =

Summary

f(x) = c

Parameters
Name Type Description
constValue System.Single c

Cos(freq,amp,phase,offset) method # =

Summary

f(x) = cos(2πfx + φ) + c

Parameters
Name Type Description
freq System.Single f
amp System.Single A
phase System.Single φ
offset System.Single c

ExponentialDecr(slope) method # =

Summary

f(x) = - (e^(sx) - 1) / (e^s - 1) + 1

Parameters
Name Type Description
slope System.Single s

ExponentialGrow(slope) method # =

Summary

f(x) = (e^(sx) - 1) / (e^s - 1)

Parameters
Name Type Description
slope System.Single s

Linear(multiplier,offset) method # =

Summary

f(x) = ax + b

Parameters
Name Type Description
multiplier System.Single a
offset System.Single b

Polinomial(exponent) method # =

Summary

f(x) = x^n

Parameters
Name Type Description
exponent System.Single n

Sin(freq,amp,phase,offset) method # =

Summary

f(x) = sin(2πfx + φ) + c

Parameters
Name Type Description
freq System.Single f
amp System.Single A
phase System.Single φ
offset System.Single c

Wait # =

Namespace

MFEP.Duality.Plugins.Animation.AnimPieces

Summary

Does not do anything during the animation. Useful to introduce waiting times between two animation blocks.

Clone this wiki locally