From 767d480f93466fed90599242b427f54dac417f52 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Mon, 21 Jul 2014 11:27:51 -0400 Subject: [PATCH] Allow click cast after waitTime over --- js/magic.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/magic.js b/js/magic.js index 0cf648d..841021a 100644 --- a/js/magic.js +++ b/js/magic.js @@ -176,16 +176,13 @@ window.onload = function () { } // if enough time has passed, cast another spell to draw - if ((timeCounter - lastCast) >= waitTime) { - if (waitTime > 500) { - return; // stop drawing - } else if (waitTime === 80){ + if (waitTime <= 500 && (timeCounter - lastCast) >= waitTime) { + if (waitTime === 80) { waitTime = 125; } else { waitTime = waitTime * 1.1; } - console.log("cast: " + waitTime); lastCast = timeCounter; if (waitTime === 125) { cast(5, 5, 270); // start position