From c09951dcf2be957d7b8854f5299be3cca2e3e020 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Wed, 23 Jul 2014 23:29:24 -0400 Subject: [PATCH] Adjust wait times between casts --- js/magic.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/js/magic.js b/js/magic.js index 35e7c04..2a8a5cb 100644 --- a/js/magic.js +++ b/js/magic.js @@ -176,15 +176,16 @@ window.onload = function () { } // if enough time has passed, cast another spell to draw - if (waitTime <= 500 && (timeCounter - lastCast) >= waitTime) { + if (timeCounter <= 15000 && (timeCounter - lastCast) >= waitTime) { if (waitTime === 50) { - waitTime = 100; - } else { + waitTime = 200; + } else if (waitTime < 300) { waitTime = waitTime * 1.1; } + console.log(waitTime); lastCast = timeCounter; - if (waitTime === 100) { + if (waitTime === 200) { cast(5, 5, 270); // start position } else { cast(undefined, undefined, undefined); // random spell position @@ -256,8 +257,6 @@ window.onload = function () { // Initialize canvas var dimensions = getDocumentDimensions(); - console.log(dimensions.height); - console.log(dimensions.width); canvas.height = dimensions.height; canvas.width = dimensions.width;