Skip to content

KernelAPI reference

Class CoroutineHandle

Namespace: MicroEngine.Scenes
Assembly: MicroEngine.dll
Guide: Scenes

Controls a coroutine started with Start.

C#
public sealed class CoroutineHandle

Inheritance

object ← CoroutineHandle

Constructors

CoroutineHandle(Action, Func<bool>)

Controls a coroutine started with Start.

C#
public CoroutineHandle(Action cancel, Func<bool> finished)

Parameters

cancel Action

finished Func<bool>

Properties

IsFinished

Whether the coroutine ran to its end or was cancelled.

C#
public bool IsFinished { get; }

Property Value

bool

Methods

Cancel()

Stops the coroutine; it does not run another step. Safe to call more than once.

C#
public void Cancel()