diff --git a/js/render.js b/js/render.js index 01cc572..48ca206 100644 --- a/js/render.js +++ b/js/render.js @@ -13,28 +13,28 @@ function render() { drawPolygon(trueCanvas.width / 2 , trueCanvas.height / 2 , 6, (settings.rows * settings.blockHeight) * (2/Math.sqrt(3)) + settings.hexWidth, 30, grey, false,6); ctx.globalAlpha = 1; } - - for (var i in MainClock.blocks) { + var i; + for (i = 0; i < MainClock.blocks.length; i++) { for (var j = 0; j < MainClock.blocks[i].length; j++) { var block = MainClock.blocks[i][j]; block.draw(true, j); } } - for (var i in blocks) { + for (i = 0; i < blocks.length; i++) { blocks[i].draw(); } - MainClock.draw(); if ( gameState ==1 | gameState ==-1 ) { drawScoreboard(); } - for (var i in MainClock.texts) { + for (i = 0; i < MainClock.texts.length; i++) { var alive = MainClock.texts[i].draw(); if(!alive){ - MainClock.texts.splice(i,1) + MainClock.texts.splice(i,1); } + i--; } diff --git a/js/wavegen.js b/js/wavegen.js index 0aa55c7..5790939 100644 --- a/js/wavegen.js +++ b/js/wavegen.js @@ -15,12 +15,12 @@ function blockDestroyed() { function waveGen(clock) { this.lastGen = 0; this.last = 0; - this.nextGen = 1650; // - 1500; //delay before starting + this.nextGen = 2000; // - 1500; //delay before starting this.start = 0; this.colors = colors; this.ct = 0; this.clock = clock; - this.difficulty = 0; + this.difficulty = 1; this.dt = 0; this.update = function() { this.currentFunction(); @@ -28,7 +28,7 @@ function waveGen(clock) { this.computeDifficulty(); if (this.dt - this.lastGen * (1/settings.creationSpeedModifier) > this.nextGen) { if (this.nextGen > 1000) { - this.nextGen -= (.7 * (this.nextGen/1300)) * settings.creationSpeedModifier; + this.nextGen -= (0.7 * (this.nextGen/1300)) * settings.creationSpeedModifier; } } };