pokerogue/src/phases/unavailable-phase.ts
Sirz Benjie 1c4edabd1d
[Refactor] Ensure that new phases are created through the phase manager
https://github.com/pagefaultgames/pokerogue/pull/5955

* Add newPhase method to phase-manager

* Update calls to append/prepend phase to use string phase

* Replace instantiations of new phase with phase manager
2025-06-07 23:55:30 -07:00

14 lines
391 B
TypeScript

import { globalScene } from "#app/global-scene";
import { Phase } from "#app/phase";
import { UiMode } from "#enums/ui-mode";
export class UnavailablePhase extends Phase {
public readonly phaseName = "UnavailablePhase";
start(): void {
globalScene.ui.setMode(UiMode.UNAVAILABLE, () => {
globalScene.phaseManager.unshiftNew("LoginPhase", true);
this.end();
});
}
}