From 47babc668a5454a38353ab41b46052ce5e0925e6 Mon Sep 17 00:00:00 2001 From: Sergey Ufocoder Date: Sun, 15 Sep 2024 04:31:21 +0300 Subject: [PATCH] chore: change event --- src/lib/ecs/systems/WeaponSystem.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecs/systems/WeaponSystem.ts b/src/lib/ecs/systems/WeaponSystem.ts index e48b25f..530a28a 100644 --- a/src/lib/ecs/systems/WeaponSystem.ts +++ b/src/lib/ecs/systems/WeaponSystem.ts @@ -280,10 +280,10 @@ export default class WeaponSystem extends System { }; createListeners() { - document.addEventListener("click", this.handleDocumentClick); + document.addEventListener("pointerdown", this.handleDocumentClick); } destroyListeners() { - document.removeEventListener("click", this.handleDocumentClick); + document.removeEventListener("pointerdown", this.handleDocumentClick); } }