forked from phenom/healer-man
15 lines
412 B
TypeScript
15 lines
412 B
TypeScript
import type { AbilityDefinition } from "./abilityCatalog";
|
|
|
|
type AbilityAnimationLookup = (id: string) => AbilityDefinition | null;
|
|
|
|
let lookup: AbilityAnimationLookup | null = null;
|
|
|
|
export function registerAbilityAnimationLookup(nextLookup: AbilityAnimationLookup): void {
|
|
lookup = nextLookup;
|
|
}
|
|
|
|
export function abilityAnimationById(id: string): AbilityDefinition | null {
|
|
return lookup?.(id) ?? null;
|
|
}
|
|
|