mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-24 18:49:16 +01:00
* Move phase types out of phase interceptor * Create isXPhase method and add properties to each phase * Replace instanceof phase with isXPhase * Fix missing union types for phaseName * Update doc comment in phase.ts * Fix incomplete comment in encounter-phase * Make phaseName as public and fix more uses * Move phaseName property declaration before constructor in move anim phase Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> * Rename isXPhase to is --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
22 lines
601 B
TypeScript
22 lines
601 B
TypeScript
import { globalScene } from "#app/global-scene";
|
|
import { PlayerGender } from "#app/enums/player-gender";
|
|
import { BattlePhase } from "./battle-phase";
|
|
|
|
export class ShowTrainerPhase extends BattlePhase {
|
|
public readonly phaseName = "ShowTrainerPhase";
|
|
start() {
|
|
super.start();
|
|
|
|
globalScene.trainer.setVisible(true);
|
|
|
|
globalScene.trainer.setTexture(`trainer_${globalScene.gameData.gender === PlayerGender.FEMALE ? "f" : "m"}_back`);
|
|
|
|
globalScene.tweens.add({
|
|
targets: globalScene.trainer,
|
|
x: 106,
|
|
duration: 1000,
|
|
onComplete: () => this.end(),
|
|
});
|
|
}
|
|
}
|