mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 23:05:23 +01:00
* [Dev] Enable Biome import sorting Additional changes: - Implement import aliases - Convert default exports to named exports - Remove relative imports * Apply changes * Misc fixes * Merge cleanup
22 lines
630 B
TypeScript
22 lines
630 B
TypeScript
import { Phase } from "#app/phase";
|
|
import { initMoveAnim, loadMoveAnimAssets } from "#data/battle-anims";
|
|
import type { MoveId } from "#enums/move-id";
|
|
|
|
/**
|
|
* Phase for synchronous move animation loading.
|
|
* Should be used when a move invokes another move that
|
|
* isn't already loaded (e.g. for Metronome)
|
|
*/
|
|
export class LoadMoveAnimPhase extends Phase {
|
|
public readonly phaseName = "LoadMoveAnimPhase";
|
|
constructor(protected moveId: MoveId) {
|
|
super();
|
|
}
|
|
|
|
public override start(): void {
|
|
initMoveAnim(this.moveId)
|
|
.then(() => loadMoveAnimAssets([this.moveId], true))
|
|
.then(() => this.end());
|
|
}
|
|
}
|