Fix crash with egg hatching
parent
824b751321
commit
442ff6b50d
|
@ -32,8 +32,8 @@ export default class EggHatchSceneHandler extends UiHandler {
|
||||||
|
|
||||||
processInput(button: Button): boolean {
|
processInput(button: Button): boolean {
|
||||||
if (button === Button.ACTION || button === Button.CANCEL) {
|
if (button === Button.ACTION || button === Button.CANCEL) {
|
||||||
const phase = this.scene.getCurrentPhase() as EggHatchPhase;
|
const phase = this.scene.getCurrentPhase();
|
||||||
if (phase.trySkip())
|
if (phase instanceof EggHatchPhase && phase.trySkip())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue