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() {