From bc10b59030584f31f7159b04ab7d8a2a4b87d4cd Mon Sep 17 00:00:00 2001 From: JJongBin Date: Fri, 9 Dec 2022 00:53:54 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20#112=20=20=EC=9D=91=EA=B8=89=EC=B2=98?= =?UTF-8?q?=EC=B9=98!!=20-=20input=EC=B0=BD=20=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EC=A4=91=20=ED=82=A4=20=EC=95=88=EB=A8=B9=ED=9E=88=EB=8A=94=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - window에 이벤트를 걸었으나....개선이 필요... - 색상 디버그 주석처리 --- frontend/src/component/Game/game.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/component/Game/game.ts b/frontend/src/component/Game/game.ts index 5f5f46b..862cc64 100644 --- a/frontend/src/component/Game/game.ts +++ b/frontend/src/component/Game/game.ts @@ -54,11 +54,11 @@ export default class Game extends Phaser.Scene { data.socket ); - const debugGraphics = this.add.graphics().setAlpha(0.7); - this.townLayer.renderDebug(debugGraphics, { - tileColor: null, - collidingTileColor: new Phaser.Display.Color(243, 234, 48, 255), - }); + // const debugGraphics = this.add.graphics().setAlpha(0.7); + // this.townLayer.renderDebug(debugGraphics, { + // tileColor: null, + // collidingTileColor: new Phaser.Display.Color(243, 234, 48, 255), + // }); this.physics.add.collider(this.myPlayer, this.townLayer); @@ -74,6 +74,13 @@ export default class Game extends Phaser.Scene { emitter.on('updateHair', (hair: string) => { this.myPlayer?.updateHair(hair); }); + + window.onclick = (e: MouseEvent) => { + const elem = e.target as HTMLElement; + const checkInput = elem.tagName === 'INPUT'; + + this.input.keyboard.manager.enabled = !checkInput; + }; } preload() {