Controller: Separate game and view loops

This commit is contained in:
LoveEevee
2019-01-16 15:33:42 +03:00
parent 926b163460
commit 3398791afe
20 changed files with 275 additions and 275 deletions

View File

@@ -64,7 +64,8 @@ class Game{
updateCirclesStatus(){
var nextSet = false
var circles = this.songData.circles
for(var i in circles){
var startIndex = this.currentCircle === 0 ? 0 : this.currentCircle - 1
for(var i = startIndex; i < circles.length && i < this.currentCircle + 2; i++){
var circle = circles[i]
if(!circle.getPlayed()){
var ms = this.elapsedTime