added bad collision detection

This commit is contained in:
lengstrom 2014-05-17 16:53:14 -04:00
parent 846bf5115e
commit 39231c75aa
2 changed files with 2 additions and 1 deletions

View file

@ -87,6 +87,7 @@ var Clock = function(sideLength) {
lane = lane % this.sides;
var arr = this.blocks[lane];
if (arr.length > 0) {
if (block.distFromHex + iter - arr[arr.length - 1].distFromHex - arr[arr.length - 1].height <= 0) {
this.addBlock(block);

View file

@ -12,7 +12,7 @@ window.requestAnimFrame = (function(){
var clock = new Clock(6);
var blocks = [];
doRand = 1;
var MainClock = new Clock(65);
var iter = 1;
var lastGen = Date.now();