Fix some bugs
This commit is contained in:
1 parent
fc4f98b203
commit
c6d9816318
5 files changed
+36
-19
No files matched your search
@@ -66,10 +66,11 @@ export default class BallUiHandler extends UiHandler {
|
||||
success = true;
|
||||
if (button === Button.ACTION && this.cursor < pokeballTypeCount) {
|
||||
if (this.scene.pokeballCounts[this.cursor]) {
|
||||
(this.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.BALL, this.cursor);
|
||||
this.scene.ui.setMode(Mode.COMMAND);
|
||||
this.scene.ui.setMode(Mode.MESSAGE);
|
||||
success = true;
|
||||
if ((this.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.BALL, this.cursor)) {
|
||||
this.scene.ui.setMode(Mode.COMMAND);
|
||||
this.scene.ui.setMode(Mode.MESSAGE);
|
||||
success = true;
|
||||
}
|
||||
} else
|
||||
ui.playError();
|
||||
} else {
|
||||
|
||||
@@ -113,14 +113,14 @@ export default class CommandUiHandler extends UiHandler {
|
||||
return ret;
|
||||
}
|
||||
|
||||
clear() {
|
||||
clear(): void {
|
||||
super.clear();
|
||||
this.commandsContainer.setVisible(false);
|
||||
this.getUi().getMessageHandler().clearText();
|
||||
this.eraseCursor();
|
||||
}
|
||||
|
||||
eraseCursor() {
|
||||
eraseCursor(): void {
|
||||
if (this.cursorObj)
|
||||
this.cursorObj.destroy();
|
||||
this.cursorObj = null;
|
||||
|
||||
Reference in new issue
Block a user