Skip to content
Snippets Groups Projects
Commit e16ccf84 authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

fix: #fe annoying scene change pointer binding

parent 2593850b
No related branches found
No related tags found
No related merge requests found
...@@ -38,8 +38,8 @@ export default class GameOverScene extends Phaser.Scene { ...@@ -38,8 +38,8 @@ export default class GameOverScene extends Phaser.Scene {
} }
bindEvents() { bindEvents() {
this.input.keyboard.once("keydown", this.startFight.bind(this)); this.input.keyboard.once("keyup", this.startFight.bind(this));
this.input.once("pointerdown", this.startFight.bind(this)); this.input.once("pointerup", this.startFight.bind(this));
} }
startFight() { startFight() {
......
...@@ -52,8 +52,8 @@ export default class WelcomeScene extends Phaser.Scene { ...@@ -52,8 +52,8 @@ export default class WelcomeScene extends Phaser.Scene {
} }
bindEvents() { bindEvents() {
this.input.keyboard.once("keydown", this.startFight.bind(this)); this.input.keyboard.once("keyup", this.startFight.bind(this));
this.input.once("pointerdown", this.startFight.bind(this)); this.input.once("pointerup", this.startFight.bind(this));
} }
startFight() { startFight() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment