Table of Contents

Class GameActionRunner

Namespace
ElectricDrill.AstraRpgFramework.GameActions
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

MonoBehaviour that manages fire-and-forget execution of GameActions with automatic lifecycle management. Tracks running actions and cancels them when the GameObject is destroyed. Use GameAction.RunFireAndForget() which automatically manages this component.

[DisallowMultipleComponent]
public class GameActionRunner : MonoBehaviour
Inheritance
object
GameActionRunner

Properties

RunningCount

Gets the number of currently running actions.

public int RunningCount { get; }

Property Value

int

Methods

CancelAll()

Cancels all running actions immediately.

public void CancelAll()

Run<TContext>(GameAction<TContext>, TContext)

Executes a GameAction fire-and-forget with automatic cancellation tracking. Multiple actions can run concurrently.

public void Run<TContext>(GameAction<TContext> action, TContext context)

Parameters

action GameAction<TContext>

The action to execute.

context TContext

The context to pass to the action.

Type Parameters

TContext

The context type for the action.