diff --git a/front/src/Phaser/Login/SelectCompanionScene.ts b/front/src/Phaser/Login/SelectCompanionScene.ts index 9caa88f7..8f641a3a 100644 --- a/front/src/Phaser/Login/SelectCompanionScene.ts +++ b/front/src/Phaser/Login/SelectCompanionScene.ts @@ -23,6 +23,7 @@ export class SelectCompanionScene extends ResizableScene { private saveZoom: number = 0; private currentCompanion = 0; + private pointerClicked: boolean = false; constructor() { super({ @@ -105,8 +106,13 @@ export class SelectCompanionScene extends ResizableScene { }); companion.setInteractive().on("pointerdown", () => { + if (this.pointerClicked) { + return; + } + this.pointerClicked = true; this.currentCompanion = i; this.moveCompanion(); + setTimeout(() => {this.pointerClicked = false;}, 250) }); this.companions.push(companion);