Interface IExecutable<TContext>
- Namespace
- ElectricDrill.AstraRpgFramework.GameActions
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Defines a contract for executable actions using Unity's Awaitable system. This interface supports the Strategy pattern with async execution.
public interface IExecutable<in TContext>
Type Parameters
TContextThe type of context object passed to the execution method.
Methods
ExecuteAsync(TContext, CancellationToken)
Executes the action asynchronously with the provided context.
Awaitable ExecuteAsync(TContext context, CancellationToken cancellationToken = default)
Parameters
contextTContextThe context object containing information needed for execution.
cancellationTokenCancellationTokenToken to cancel the operation.
Returns
- Awaitable
An Awaitable that completes when the action finishes.