added bad collision detection
This commit is contained in:
parent
dafc21cd2b
commit
575a9f62e8
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
2
main.js
2
main.js
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue