Add skip for egg hatch animation
This commit is contained in:
1 parent
b6bde457cd
commit
824b751321
2 files changed
+99
-60
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user