From be60d0ef03b0bcf90b0f1d4cca26f6a3493fcabb Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Thu, 3 Feb 2022 09:50:52 +0100 Subject: [PATCH] fixed actions-menu not appearing --- front/src/Phaser/Entity/RemotePlayer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Entity/RemotePlayer.ts b/front/src/Phaser/Entity/RemotePlayer.ts index df496896..f1c47bdd 100644 --- a/front/src/Phaser/Entity/RemotePlayer.ts +++ b/front/src/Phaser/Entity/RemotePlayer.ts @@ -38,11 +38,11 @@ export class RemotePlayer extends Character implements ActivatableInterface { //set data this.userId = userId; + this.visitCardUrl = visitCardUrl; this.registeredActions = []; this.registerDefaultActionsMenuActions(); this.setClickable(this.registeredActions.length > 0); this.activationRadius = activationRadius ?? 96; - this.visitCardUrl = visitCardUrl; this.actionsMenuStoreUnsubscriber = actionsMenuStore.subscribe((value: ActionsMenuData | undefined) => { this.isActionsMenuInitialized = value ? true : false; }); @@ -118,7 +118,7 @@ export class RemotePlayer extends Character implements ActivatableInterface { private bindEventHandlers(): void { this.on(Phaser.Input.Events.POINTER_DOWN, (event: Phaser.Input.Pointer) => { - if (event.downElement.nodeName === "CANVAS") { + if (event.downElement.nodeName === "CANVAS" && event.leftButtonDown()) { this.toggleActionsMenu(); } });