Fix - double inputs (#1842)

* fix an issue where the input repeated itself too fast

* remove remnant code
This commit is contained in:
Greenlamp2 2024-06-06 22:55:01 +02:00 committed by GitHub
parent a18d796e2e
commit 9c1a13eb54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -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<Phaser.Input.Gamepad.Gamepad> = 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"