Animation-driven abilities¶
Abilities play Animator states and follow them, without a separate timeline editor:
context.PlayAnimation("Swing1", interruptState: "Idle"); // cross-fade; blends to Idle if the ability is cancelled
await context.WaitAnimationEvent(hitStart); // Animation Event: ArcanaEvent("Event.Hit.Start")
using (context.OpenHitWindow(cone, enemies, target => context.ApplyEffectToTarget(spec, target)))
await context.WaitAnimationEvent(hitEnd); // every target crossed while open is hit once
bool chained = await context.WaitUntil(() => context.Spec.InputPressedTime > windowStart, timeout: 0.35f);
await context.WaitAnimationEnd();
Animation Events reach the ability system through an AnimationEventRelay on the GameObject with the Animator.
WaitUntil(condition, timeout) waits for anything the core cannot observe; the condition is checked after every world tick.
A cancelled ability never resumes its waits, so an interrupted swing deals no late damage.