Interface IAbilityController
Interface for ability controllers, managing ability activation and state. Inherits from IAbilityKnowledgeController for known ability/event management. Consumers that only need to query or modify known abilities should depend on IAbilityKnowledgeController instead for better interface segregation.
public interface IAbilityController : IAbilityKnowledgeController, ICharacterBehaviour
- Inherited Members
Properties
AbilityQueued
True if an ability is queued for activation.
bool AbilityQueued { get; }
Property Value
IsActivating
True if an ability is currently activating.
bool IsActivating { get; }
Property Value
OnAbilityActivateTriggers
Triggers invoked on the server when an ability activation begins (non-replay).
List<Trigger> OnAbilityActivateTriggers { get; }
Property Value
OnAbilityCompleteTriggers
Triggers invoked on the server when an ability activation completes (non-replay).
List<Trigger> OnAbilityCompleteTriggers { get; }
Property Value
RemainingActivationTime
The remaining activation time for the current ability, or 0 if no ability is active.
float RemainingActivationTime { get; }
Property Value
Methods
Activate(long, bool)
Activates an ability by reference ID and held state.
void Activate(long referenceID, bool isHeld)
Parameters
ActivateConsumable(Item)
Queues a consumable item for activation through the replicate pipeline.
void ActivateConsumable(Item item)
Parameters
itemItemThe consumable item to activate.
CanManipulate()
Returns true if manipulation is allowed.
bool CanManipulate()
Returns
Cancel()
Cancels the current ability immediately, clearing all activation state. Safe to call from any context; uses default internal parameters.
void Cancel()
GetCurrentAbilityType()
Gets the current ability type.
AbilityType GetCurrentAbilityType()
Returns
Interrupt(ICharacter)
Interrupts the current ability, optionally specifying the attacker.
void Interrupt(ICharacter attacker)
Parameters
attackerICharacterThe character causing the interruption.
Release()
Releases the held state for the current ability. For charged abilities this triggers the release (fire). For channeled abilities this stops the channel early.
void Release()
RequiresHeld(long)
Returns true if the ability requires held input (channeled or charged). AI should pass the result as the isHeld parameter when calling Activate().
bool RequiresHeld(long abilityID)
Parameters
abilityIDlongThe ability ID to check.
Returns
Events
OnAbilityDenied
Fired when the server denies an ability the client already started predicting. Subscribers should show an "interrupted" flash, restore predicted resources, etc.
event Action<long> OnAbilityDenied
Event Type
OnCanManipulate
Event triggered to check if manipulation is allowed.
event Func<bool> OnCanManipulate
Event Type
OnCancel
Event triggered when the current ability is cancelled.
event Action OnCancel
Event Type
OnInterrupt
Event triggered when the current ability is interrupted.
event Action OnInterrupt
Event Type
OnPredictionMismatch
Fired when predicted ability objects are destroyed due to state mismatch. Provides the reconcile tick. For 1-2 tick mismatches, replay corrects invisibly.
event Action<uint> OnPredictionMismatch
Event Type
OnReset
Event triggered to reset the UI.
event Action OnReset
Event Type
OnUpdate
Event triggered to update ability UI or state.
event Action<string, float, float> OnUpdate