properly time based
This commit is contained in:
parent
9a0e11d4b7
commit
d49100924c
2 changed files with 4 additions and 2 deletions
|
@ -15,6 +15,7 @@ function Hex(sideLength) {
|
|||
this.x = trueCanvas.width / 2;
|
||||
this.y = trueCanvas.height / 2;
|
||||
this.ct = 0;
|
||||
this.lastUpdate = Date.now();
|
||||
this.lastCombo = this.ct - settings.comboTime;
|
||||
this.lastColorScored = "#000";
|
||||
this.comboTime = 1;
|
||||
|
|
|
@ -67,6 +67,7 @@ function update() {
|
|||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
MainHex.ct++;
|
||||
if(Date.now()-MainHex.lastUpdate>=17){
|
||||
MainHex.ct++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue