Class ToggleRenderersGameAction<TContext>
- Namespace
- ElectricDrill.AstraRpgFramework.GameActions.Actions
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Base action to enable/disable all Renderers on a Component's GameObject.
public abstract class ToggleRenderersGameAction<TContext> : GameAction<TContext>, IExecutable<TContext> where TContext : Component
Type Parameters
TContext
- Inheritance
-
objectGameAction<TContext>ToggleRenderersGameAction<TContext>
- Implements
-
IExecutable<TContext>
- Derived
- Inherited Members
Fields
_enable
[SerializeField]
[Tooltip("Function to apply to renderers (True = Show, False = Hide)")]
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
contextTContextThe context object containing information needed for execution.
cancellationTokenCancellationTokenToken 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.