Table of Contents

Class Echo

An echo is a simple update loop that provides a delta time and other settings for custom animation For more information please go to https://flowent.friedsynapse.com/echo

public sealed class Echo : AbstractAnimation, IControllable
Inheritance
Echo
Implements
Inherited Members
Extension Methods

Constructors

Echo(EchoOptions)

Creates a new echo using the options provided.

public Echo(EchoOptions options)

Parameters

options EchoOptions

Echo(float?, bool)

Creates a new echo.

public Echo(float? timeout = null, bool autoStart = false)

Parameters

timeout float?

The amount of time for this echo in seconds.

autoStart bool

Whether the echo should start automatically or not.

Properties

StopCondition

public Func<float, bool> StopCondition { get; }

Property Value

Func<float, bool>

Timeout

public float? Timeout { get; }

Property Value

float?

Methods

Apply(params AbstractEchoMotion[])

Applies all the motions to the current echo.

public Echo Apply(params AbstractEchoMotion[] motions)

Parameters

motions AbstractEchoMotion[]

Returns

Echo

Apply(IEnumerable<AbstractEchoMotion>)

Applies all the motions to the current echo.

public Echo Apply(IEnumerable<AbstractEchoMotion> motions)

Parameters

motions IEnumerable<AbstractEchoMotion>

Returns

Echo

Conditional(Func<bool>, Action<Echo>)

Executes the onConditionTrue if condition returns true.

public Echo Conditional(Func<bool> condition, Action<Echo> onConditionTrue)

Parameters

condition Func<bool>

The condition.

onConditionTrue Action<Echo>

The callback.

Returns

Echo

ForAll<TItem>(IEnumerable<TItem>)

Creates a scope for the object so you can add motions designed specifically for that enumeration of objects.

public EchoMotionProxyArray<TItem> ForAll<TItem>(IEnumerable<TItem> elements)

Parameters

elements IEnumerable<TItem>

Returns

EchoMotionProxyArray<TItem>

Type Parameters

TItem

For<TItem>(TItem)

Creates a scope for the object so you can add motions designed specifically for that object.

public EchoMotionProxy<TItem> For<TItem>(TItem element)

Parameters

element TItem

Returns

EchoMotionProxy<TItem>

Type Parameters

TItem

For<TItem>(params TItem[])

Creates a scope for the object so you can add motions designed specifically for that array of objects.

public EchoMotionProxyArray<TItem> For<TItem>(params TItem[] elements)

Parameters

elements TItem[]

Returns

EchoMotionProxyArray<TItem>

Type Parameters

TItem

OnCompleted(Action)

Adds an event called when the animation has completed.

public Echo OnCompleted(Action callback)

Parameters

callback Action

The event.

Returns

Echo

OnCompleting(Action)

Adds an event called when the animation is completing.

public Echo OnCompleting(Action callback)

Parameters

callback Action

The event.

Returns

Echo

OnLoopCompleted(Action<int?>)

Adds an event called when the animation loop has completed.

public Echo OnLoopCompleted(Action<int?> callback)

Parameters

callback Action<int?>

The event. The parameter represents the number of loops left. If there are infinite loops it'll send a null param.

Returns

Echo

OnLoopStarted(Action<int?>)

Adds an event called when the animation loop has started.

public Echo OnLoopStarted(Action<int?> callback)

Parameters

callback Action<int?>

The event. The parameter represents the number of loops left. If there are infinite loops it'll send a null param.

Returns

Echo

OnStarted(Action)

Adds an event called when the animation has started.

public Echo OnStarted(Action callback)

Parameters

callback Action

The event.

Returns

Echo

OnStarting(Action)

Adds an event called when the animation is starting.

public Echo OnStarting(Action callback)

Parameters

callback Action

The event.

Returns

Echo

OnUpdated(Action<float>)

Adds an event called when the animation has updated.

public Echo OnUpdated(Action<float> callback)

Parameters

callback Action<float>

The event.

Returns

Echo

OnUpdating(Action<float>)

Adds an event called when the animation is updating.

public Echo OnUpdating(Action<float> callback)

Parameters

callback Action<float>

The event.

Returns

Echo

Pause()

Pauses the animation.

public Echo Pause()

Returns

Echo

Reset()

Resets the animation so in can be replayed.

public Echo Reset()

Returns

Echo

Exceptions

AnimationException

If the animation is not finished.

AnimationException

If the echo is not finished.

ResetInternal()

protected override void ResetInternal()

Resume()

Resumes the animation.

public Echo Resume()

Returns

Echo

SetAutoStart(bool)

Sets whether this animation should auto-start or not.

public Echo SetAutoStart(bool autoStart)

Parameters

autoStart bool

Returns

Echo

Remarks

Auto-start will be slower than a true-start. See more at https://flowent.friedsynapse.com/tips#h.s5cucrg5qyjc

SetDelay(float)

Sets the amount of time in seconds that you want to delay when this animation is started.

public Echo SetDelay(float time)

Parameters

time float

Returns

Echo

SetDelayUntil(Func<bool>)

Sets the callback that holds the starting of the animation.

public Echo SetDelayUntil(Func<bool> callback)

Parameters

callback Func<bool>

Returns

Echo

SetEvents(EchoEvents)

Sets all the events for this echo.

public Echo SetEvents(EchoEvents events)

Parameters

events EchoEvents

Returns

Echo

SetEvents(Func<EchoEvents, EchoEvents>)

Creates a builder for events and then sets all the events for this echo.

public Echo SetEvents(Func<EchoEvents, EchoEvents> eventsBuilder)

Parameters

eventsBuilder Func<EchoEvents, EchoEvents>

Returns

Echo

SetLoopCount(int?)

Sets the amount of loops you want this animation to have. If you want infinite loops pass a null value.

public Echo SetLoopCount(int? loopCount)

Parameters

loopCount int?

Returns

Echo

Remarks

Flows only have reset loop types.

SetName(string)

Sets the name of the animation.

public Echo SetName(string name)

Parameters

name string

Returns

Echo

SetOptions(EchoOptions)

Sets all the options for this tween.

public Echo SetOptions(EchoOptions options)

Parameters

options EchoOptions

Returns

Echo

SetOptions(Func<EchoOptions, EchoOptions>)

Creates a builder for options and then sets all the options for this echo.

public Echo SetOptions(Func<EchoOptions, EchoOptions> optionsBuilder)

Parameters

optionsBuilder Func<EchoOptions, EchoOptions>

Returns

Echo

SetSkipFrames(int)

Sets the amount of frames you want to skip at when this animation is started.

public Echo SetSkipFrames(int frames)

Parameters

frames int

Returns

Echo

SetStopCondition(Func<float, bool>)

Sets the condition that when true, it will stop the echo.

public Echo SetStopCondition(Func<float, bool> stopCondition)

Parameters

stopCondition Func<float, bool>

Returns

Echo

SetTimeScale(float)

Sets the time scale for the current animation.

public Echo SetTimeScale(float timeScale)

Parameters

timeScale float

Returns

Echo

SetTimeout(float?)

Sets the amount of time in seconds that this echo will last.

public Echo SetTimeout(float? timeout)

Parameters

timeout float?

Returns

Echo

SetUpdateType(UpdateType)

Sets the update type for the animation.

public Echo SetUpdateType(UpdateType updateType)

Parameters

updateType UpdateType

Returns

Echo

Start()

Starts the animation.

public Echo Start()

Returns

Echo

Exceptions

AnimationException

If the echo has already started.

StartAsync(CancellationToken?)

Starts the animation async(you can await this till the animation finishes).

public Task<Echo> StartAsync(CancellationToken? token = null)

Parameters

token CancellationToken?

The cancellation doesn't cancel the task, but rather terminates the animation. The task will be completed

Returns

Task<Echo>

Exceptions

AnimationException

If the echo has already started.

Stop(bool)

Stops the animation.

public Echo Stop(bool triggerOnCompleted = false)

Parameters

triggerOnCompleted bool

If set to true will trigger the "OnCompleted" event on the animation

Returns

Echo