Table of Contents

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

TContext

The 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

context TContext

The context object containing information needed for execution.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Awaitable

An Awaitable that completes when the action finishes.