Header menu logo Nu

Coroutine Type

A coroutine in Nu allows easy definition of static behavior over multiple frames.

Union cases

Union case Description

Cancel

Full Usage: Cancel

Complete

Full Usage: Complete

Sleep(Duration, Continuation)

Full Usage: Sleep(Duration, Continuation)

Parameters:
Duration : GameTime
Continuation : unit -> Coroutine

Instance members

Instance member Description

this.IsCancel

Full Usage: this.IsCancel

Returns: bool
Returns: bool

this.IsComplete

Full Usage: this.IsComplete

Returns: bool
Returns: bool

this.IsSleep

Full Usage: this.IsSleep

Returns: bool
Returns: bool

Static members

Static member Description

Coroutine.cancel

Full Usage: Coroutine.cancel

Returns: CoroutineInstruction

A coroutine instruction that cancels the entire tree.

Returns: CoroutineInstruction

Coroutine.pass

Full Usage: Coroutine.pass

Returns: CoroutineInstruction

A coroutine instruction that sleeps until the next frame (the shortest possible time in DynamicFrameRate mode).

Returns: CoroutineInstruction

Coroutine.sleep duration

Full Usage: Coroutine.sleep duration

Parameters:
Returns: CoroutineInstruction

A coroutine instruction that sleeps until the given game time.

duration : GameTime
Returns: CoroutineInstruction

Type something to start searching.