From 9c1a13eb54ebf14103a200023909fe35baeec99b Mon Sep 17 00:00:00 2001 From: Greenlamp2 <44787002+Greenlamp2@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:55:01 +0200 Subject: [PATCH] Fix - double inputs (#1842) * fix an issue where the input repeated itself too fast * remove remnant code --- src/inputs-controller.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index aa0f781cfef..ac5d339c048 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -48,7 +48,7 @@ export interface InterfaceConfig { custom?: MappingLayout; } -const repeatInputDelayMillis = 250; +const repeatInputDelayMillis = 500; // Phaser.Input.Gamepad.GamepadPlugin#refreshPads declare module "phaser" { @@ -88,7 +88,6 @@ declare module "phaser" { * providing a unified interface for all input-related interactions. */ export class InputsController { - private buttonKeys: Phaser.Input.Keyboard.Key[][]; private gamepads: Array = new Array(); private scene: BattleScene; public events: Phaser.Events.EventEmitter; @@ -123,7 +122,6 @@ export class InputsController { constructor(scene: BattleScene) { this.scene = scene; this.time = this.scene.time; - this.buttonKeys = []; this.selectedDevice = { [Device.GAMEPAD]: null, [Device.KEYBOARD]: "default"