Add skip for egg hatch animation

This commit is contained in:
Flashfyre committed 2024-02-20 00:24:39 -05:00
1 parent b6bde457cd
commit 824b751321
2 files changed
+99 -60

No files matched your search

+7
View File
@@ -1,4 +1,5 @@
import BattleScene, { Button } from "../battle-scene";
import { EggHatchPhase } from "../egg-hatch-phase";
import { Mode } from "./ui";
import UiHandler from "./ui-handler";
@@ -30,6 +31,12 @@ export default class EggHatchSceneHandler extends UiHandler {
}
processInput(button: Button): boolean {
if (button === Button.ACTION || button === Button.CANCEL) {
const phase = this.scene.getCurrentPhase() as EggHatchPhase;
if (phase.trySkip())
return true;
}
return this.scene.ui.getMessageHandler().processInput(button);
}