Formatting consistency changes
This commit is contained in:
parent
1b41bdb8e3
commit
4057fbf846
|
@ -215,7 +215,7 @@ export default class BattleScene extends SceneBase {
|
||||||
[Button.CYCLE_NATURE]: 2, // square
|
[Button.CYCLE_NATURE]: 2, // square
|
||||||
[Button.SPEED_UP]: 10, // L3
|
[Button.SPEED_UP]: 10, // L3
|
||||||
[Button.SLOW_DOWN]: 11 // R3
|
[Button.SLOW_DOWN]: 11 // R3
|
||||||
}
|
};
|
||||||
public gamepadButtonStates: boolean[] = new Array(17).fill(false);
|
public gamepadButtonStates: boolean[] = new Array(17).fill(false);
|
||||||
|
|
||||||
public rngCounter: integer = 0;
|
public rngCounter: integer = 0;
|
||||||
|
@ -1299,20 +1299,18 @@ export default class BattleScene extends SceneBase {
|
||||||
* again.
|
* again.
|
||||||
*/
|
*/
|
||||||
gamepadButtonJustDown(button: Phaser.Input.Gamepad.Button) : boolean {
|
gamepadButtonJustDown(button: Phaser.Input.Gamepad.Button) : boolean {
|
||||||
|
if (!button)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!button) return;
|
let ret = false;
|
||||||
|
|
||||||
let returnValue = false;
|
|
||||||
if (button.pressed) {
|
if (button.pressed) {
|
||||||
if (!this.gamepadButtonStates[button.index]) {
|
if (!this.gamepadButtonStates[button.index])
|
||||||
returnValue = true;
|
ret = true;
|
||||||
}
|
|
||||||
this.gamepadButtonStates[button.index] = true;
|
this.gamepadButtonStates[button.index] = true;
|
||||||
} else {
|
} else
|
||||||
this.gamepadButtonStates[button.index] = false;
|
this.gamepadButtonStates[button.index] = false;
|
||||||
}
|
|
||||||
|
|
||||||
return returnValue;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonJustPressed(button: Button): boolean {
|
buttonJustPressed(button: Button): boolean {
|
||||||
|
|
Loading…
Reference in New Issue