moved incrementing MainClock.ct from render to update

This commit is contained in:
Garrett Finucane 2014-06-24 13:41:40 -04:00
parent 83152a24ea
commit 28515ab67c
5 changed files with 3 additions and 7 deletions

View file

@ -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);

View file

@ -129,7 +129,6 @@ function Clock(sideLength) {
};
this.draw = function() {
this.ct++;
this.x = trueCanvas.width/2;
if (gameState != -2) {

View file

@ -1,2 +0,0 @@
77.43
17.8

View file

@ -316,7 +316,7 @@ function animLoop() {
}
else if (gameState == -1) { //pause
requestAnimFrame(animLoop);
render();
render();
}
else if (gameState == 2) { //end screen
requestAnimFrame(animLoop);

View file

@ -78,6 +78,6 @@ function update() {
i--;
}
}
MainClock.ct++;
count++;
}