Table of Contents

Struct CoroutineBuilder

Namespace
LunyScript.Api
/
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
Expand Details ...
Inherited Members

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

Type Name Description
Double
interval

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

Type Name Description
Double
duration

Returns

CoroutineTimerBuilder<CoroutineTimerAmountSet>