Expand tutorials
This commit is contained in:
1 parent
2da283c600
commit
24bf116b37
8 files changed
+116
-23
No files matched your search
@@ -1,12 +1,26 @@
|
||||
import BattleScene from "../battle-scene";
|
||||
import BattleScene, { Button } from "../battle-scene";
|
||||
import { Mode } from "./ui";
|
||||
import UiHandler from "./ui-handler";
|
||||
|
||||
export default abstract class AwaitableUiHandler extends UiHandler {
|
||||
protected awaitingActionInput: boolean;
|
||||
protected onActionInput: Function;
|
||||
public tutorialActive: boolean = false;
|
||||
|
||||
constructor(scene: BattleScene, mode: Mode) {
|
||||
super(scene, mode);
|
||||
}
|
||||
|
||||
processTutorialInput(button: Button): boolean {
|
||||
if ((button === Button.ACTION || button === Button.CANCEL) && this.onActionInput) {
|
||||
this.getUi().playSelect();
|
||||
const originalOnActionInput = this.onActionInput;
|
||||
this.onActionInput = null;
|
||||
originalOnActionInput();
|
||||
this.awaitingActionInput = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user