Table of Contents

Class ToggleEntityCollidersGameAction<TContext>

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

Base action to enable/disable all Collider and Collider2D components found on the Entity's GameObject and its children.

public abstract class ToggleEntityCollidersGameAction<TContext> : GameAction<TContext>, IExecutable<TContext>, ITaggable where TContext : IHasEntity

Type Parameters

TContext

Any context type that provides an EntityCore reference via IHasEntity.

Inheritance
object
GameAction<TContext>
ToggleEntityCollidersGameAction<TContext>
Implements
IExecutable<TContext>
Derived
Inherited Members

Fields

_enable

[SerializeField]
[Tooltip("True = enable colliders, False = disable colliders.")]
protected bool _enable

Field Value

bool

Methods

ExecuteAsync(TContext, CancellationToken)

Executes the action asynchronously with the provided context. Override this method to implement your action logic.

public override 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. MonoBehaviour owners can use their "destroyCancellationToken" to automatically cancel when destroyed.

Returns

Awaitable

An Awaitable that completes when the action finishes.