tab -> spaces what about now github ?

This commit is contained in:
Greenlamp 2024-05-03 18:58:07 +02:00
parent 1d2bc88cab
commit 62e4ff7b33
3 changed files with 65 additions and 66 deletions

View File

@ -1,4 +1,4 @@
import Phaser, { Time } from "phaser";
import Phaser, {Time} from "phaser";
import * as Utils from "./utils";
import {initTouchControls} from './touch-controls';
import pad_generic from "#app/configs/pad_generic";
@ -26,6 +26,7 @@ export enum Button {
SPEED_UP,
SLOW_DOWN
}
const repeatInputDelayMillis = 250;
export class InputsController extends Phaser.Plugins.ScenePlugin {
@ -106,7 +107,7 @@ export class InputsController extends Phaser.Plugins.ScenePlugin {
}
}
refreshGamepads() :void {
refreshGamepads(): void {
// Sometimes, gamepads are undefined. For some reason.
this.gamepads = this.systems.input.gamepad.gamepads.filter(function (el) {
return el != null;
@ -227,11 +228,9 @@ export class InputsController extends Phaser.Plugins.ScenePlugin {
if (id.includes('081f') && id.includes('e401')) {
padConfig = pad_unlicensedSNES;
}
else if (id.includes('xbox') && id.includes('360')) {
} else if (id.includes('xbox') && id.includes('360')) {
padConfig = pad_xbox360;
}
else if (id.includes('054c')) {
} else if (id.includes('054c')) {
padConfig = pad_dualshock;
}

View File

@ -139,7 +139,7 @@ export class UiInputs extends Phaser.Plugins.ScenePlugin {
return [inputSuccess, 0];
}
buttonSpeedChange(up= true): Array<boolean | number> {
buttonSpeedChange(up = true): Array<boolean | number> {
if (up) {
if (this.scene.gameSpeed < 5) {
this.scene.gameData.saveSetting(Setting.Game_Speed, settingOptions[Setting.Game_Speed].indexOf(`${this.scene.gameSpeed}x`) + 1);