Allow click cast after waitTime over

This commit is contained in:
Tyler Hallada 2014-07-21 11:27:51 -04:00
parent 208a20f06f
commit 767d480f93

View File

@ -176,16 +176,13 @@ window.onload = function () {
} }
// if enough time has passed, cast another spell to draw // if enough time has passed, cast another spell to draw
if ((timeCounter - lastCast) >= waitTime) { if (waitTime <= 500 && (timeCounter - lastCast) >= waitTime) {
if (waitTime > 500) { if (waitTime === 80) {
return; // stop drawing
} else if (waitTime === 80){
waitTime = 125; waitTime = 125;
} else { } else {
waitTime = waitTime * 1.1; waitTime = waitTime * 1.1;
} }
console.log("cast: " + waitTime);
lastCast = timeCounter; lastCast = timeCounter;
if (waitTime === 125) { if (waitTime === 125) {
cast(5, 5, 270); // start position cast(5, 5, 270); // start position