Skip to content

Coroutine

BelicusBr edited this page Sep 7, 2024 · 2 revisions

Coroutine Class

Definition

Namespace: Cobilas.GodotEngine.Utility

Represents a coroutine process.

public sealed class Coroutine : IEnumerable, IDisposable

Inheritance: Object > Coroutine
Implements: IEnumerable, IDisposable

Constructors

Constructor Description
Coroutine(IEnumerator, string) starts an instance of a represents a coroutine process.

Properties

Property Description
ID Returns the ID of the coroutine.
IsRunning Returns true if the process is running. Returns false if the process has terminated.
IsCancellationRequested Returns true if the process was canceled. Returns false if the process was not canceled.

Methods

Method Description
Cancel() When called it will cancel the coroutine.
CancelAfter(TimeSpan) When called, it will cancel the coroutine after the time defined in the parameter.
CancelAfter(int) When called, it will cancel the coroutine after the time defined in the parameter.
Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Explicit Interface Implementations

Method Description
IEnumerable.GetEnumerator() Returns an enumerator that iterates through a collection.

Applies to

Product Versions
Godot 3.5
.NET Framework 4.7.2 or higher
.NET Standard 2.1 or higher
Package 1.0.0 or higher