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 ((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