Table of Contents

Struct CoroutineBuilder

Namespace
LunyScript.ScriptApi
Assembly
LunyScript.dll

Entry point for the Coroutine fluent builder chain. Usage: Coroutine("name").For(3).Seconds().OnFrameUpdate(blocks).WhenElapsed(blocks); Coroutine("name").OnFrameUpdate(blocks).WhenStopped(blocks).Do(blocks); Coroutine("name").OnHeartbeat(blocks).Do(blocks);

public readonly struct CoroutineBuilder

Methods

Every(double)

A repeating timer coroutine which fires at the specified interval. The Do(blocks) execute on every interval elapse.

public CoroutineTimerBuilder<CoroutineTimerAmountSet> Every(double interval)

Parameters

interval double

Returns

CoroutineTimerBuilder<CoroutineTimerAmountSet>

In(double)

A finite timer coroutine which fires after the specified duration. The Do(blocks) execute when elapsed.

public CoroutineTimerBuilder<CoroutineTimerAmountSet> In(double duration)

Parameters

duration double

Returns

CoroutineTimerBuilder<CoroutineTimerAmountSet>