standardized block fall speed on hexagon

This commit is contained in:
meadowstream 2014-07-01 22:29:53 -04:00
parent 7fec2e36a1
commit 94e70f9e31
2 changed files with 4 additions and 0 deletions

View file

@ -128,6 +128,7 @@ function Block(fallingLane, color, iter, distFromHex, settled) {
else {
ctx.fillStyle = this.color;
}
ctx.globalAlpha = this.opacity;
var baseX = trueCanvas.width / 2 + Math.sin((this.angle) * (Math.PI / 180)) * (this.distFromHex + this.height / 2) + gdx;
var baseY = trueCanvas.height / 2 - Math.cos((this.angle) * (Math.PI / 180)) * (this.distFromHex + this.height / 2) + gdy;
@ -149,6 +150,7 @@ function Block(fallingLane, color, iter, distFromHex, settled) {
this.iter = 2.25;
this.tint = 0;
}
ctx.fillStyle = "#FFF";
ctx.globalAlpha = this.tint;
ctx.beginPath();

View file

@ -68,6 +68,7 @@ function Clock(sideLength) {
block.checked = 1;
} else {
block.settled = 0;
block.iter = 1.5 + (waveone.difficulty/15) * 3;
}
} else {
if (arr[position - 1].settled && block.distFromHex - block.iter * settings.scale - arr[position - 1].distFromHex - arr[position - 1].height <= 0) {
@ -77,6 +78,7 @@ function Clock(sideLength) {
}
else {
block.settled = 0;
block.iter = 1.5 + (waveone.difficulty/15) * 3;
}
}
} else {