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
-
objectGameActionRunner
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
actionGameAction<TContext>The action to execute.
contextTContextThe context to pass to the action.
Type Parameters
TContextThe context type for the action.