moved incrementing MainClock.ct from render to update
This commit is contained in:
parent
83152a24ea
commit
28515ab67c
5 changed files with 3 additions and 7 deletions
|
@ -91,14 +91,13 @@ function Block(fallingLane, color, iter, distFromHex, settled) {
|
|||
else {
|
||||
this.angle += this.angularVelocity;
|
||||
}
|
||||
|
||||
this.ct++;
|
||||
this.width = 2 * this.distFromHex / Math.sqrt(3);
|
||||
this.widthWide = this.width + this.height + 3;
|
||||
var p1;
|
||||
var p2;
|
||||
var p3;
|
||||
var p4;
|
||||
this.ct++;
|
||||
if (this.initializing) {
|
||||
var rat = (this.ct/this.initLen);
|
||||
p1 = rotatePoint((-this.width / 2) * rat, this.height / 2, this.angle);
|
||||
|
|
|
@ -129,7 +129,6 @@ function Clock(sideLength) {
|
|||
};
|
||||
|
||||
this.draw = function() {
|
||||
this.ct++;
|
||||
this.x = trueCanvas.width/2;
|
||||
|
||||
if (gameState != -2) {
|
||||
|
|
2
js/asdf
2
js/asdf
|
@ -1,2 +0,0 @@
|
|||
77.43
|
||||
17.8
|
|
@ -316,7 +316,7 @@ function animLoop() {
|
|||
}
|
||||
else if (gameState == -1) { //pause
|
||||
requestAnimFrame(animLoop);
|
||||
render();
|
||||
render();
|
||||
}
|
||||
else if (gameState == 2) { //end screen
|
||||
requestAnimFrame(animLoop);
|
||||
|
|
|
@ -78,6 +78,6 @@ function update() {
|
|||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
MainClock.ct++;
|
||||
count++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue