Formatting consistency changes

pull/164/head
Flashfyre 2024-04-15 19:44:30 -04:00 committed by Samuel H
parent 1b41bdb8e3
commit 4057fbf846
2 changed files with 13 additions and 15 deletions

View File

@ -215,7 +215,7 @@ export default class BattleScene extends SceneBase {
[Button.CYCLE_NATURE]: 2, // square
[Button.SPEED_UP]: 10, // L3
[Button.SLOW_DOWN]: 11 // R3
}
};
public gamepadButtonStates: boolean[] = new Array(17).fill(false);
public rngCounter: integer = 0;
@ -1299,20 +1299,18 @@ export default class BattleScene extends SceneBase {
* again.
*/
gamepadButtonJustDown(button: Phaser.Input.Gamepad.Button) : boolean {
if (!button)
return false;
if (!button) return;
let returnValue = false;
let ret = false;
if (button.pressed) {
if (!this.gamepadButtonStates[button.index]) {
returnValue = true;
}
if (!this.gamepadButtonStates[button.index])
ret = true;
this.gamepadButtonStates[button.index] = true;
} else {
} else
this.gamepadButtonStates[button.index] = false;
}
return returnValue;
return ret;
}
buttonJustPressed(button: Button): boolean {