From c999dca204015aa6ec49ba7f3e54c87be842fde7 Mon Sep 17 00:00:00 2001 From: LoveEevee Date: Fri, 5 Oct 2018 21:12:50 +0300 Subject: [PATCH] Fix song restarting and multiple touches --- public/src/js/controller.js | 4 ++-- public/src/js/view.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/js/controller.js b/public/src/js/controller.js index 4e013db..2b1ea13 100644 --- a/public/src/js/controller.js +++ b/public/src/js/controller.js @@ -136,10 +136,10 @@ class Controller{ restartSong(){ this.clean() if(this.multiplayer){ - new loadSong(this.selectedSong, false, true) + new loadSong(this.selectedSong, false, true, this.touchEnabled) }else{ loader.changePage("game") - var taikoGame = new Controller(this.selectedSong, this.songData, this.autoPlayEnabled) + var taikoGame = new Controller(this.selectedSong, this.songData, this.autoPlayEnabled, false, this.touchEnabled) taikoGame.run() } } diff --git a/public/src/js/view.js b/public/src/js/view.js index 22e5aec..35ea3b5 100644 --- a/public/src/js/view.js +++ b/public/src/js/view.js @@ -933,7 +933,7 @@ class View{ } } ontouch(event){ - for(let touch of event.touches){ + for(let touch of event.changedTouches){ event.preventDefault() var scale = this.canvas.scale var pageX = touch.pageX * scale