mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-21 04:25:50 +02:00
21 lines
439 B
TypeScript
21 lines
439 B
TypeScript
import type { MoveAnim } from "#app/data/battle-anims";
|
|
import { Phase } from "#app/phase";
|
|
|
|
/**
|
|
* Plays the given {@linkcode MoveAnim} sequentially.
|
|
*/
|
|
export class MoveAnimPhase<Anim extends MoveAnim> extends Phase {
|
|
constructor(
|
|
protected anim: Anim,
|
|
protected onSubstitute = false,
|
|
) {
|
|
super();
|
|
}
|
|
|
|
public override start(): void {
|
|
super.start();
|
|
|
|
this.anim.play(this.onSubstitute, () => this.end());
|
|
}
|
|
}
|