Adjust wait times between casts

This commit is contained in:
Tyler Hallada 2014-07-23 23:29:24 -04:00
parent 0e4aa53353
commit c09951dcf2

View File

@ -176,15 +176,16 @@ window.onload = function () {
} }
// if enough time has passed, cast another spell to draw // 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) { if (waitTime === 50) {
waitTime = 100; waitTime = 200;
} else { } else if (waitTime < 300) {
waitTime = waitTime * 1.1; waitTime = waitTime * 1.1;
} }
console.log(waitTime);
lastCast = timeCounter; lastCast = timeCounter;
if (waitTime === 100) { if (waitTime === 200) {
cast(5, 5, 270); // start position cast(5, 5, 270); // start position
} else { } else {
cast(undefined, undefined, undefined); // random spell position cast(undefined, undefined, undefined); // random spell position
@ -256,8 +257,6 @@ window.onload = function () {
// Initialize canvas // Initialize canvas
var dimensions = getDocumentDimensions(); var dimensions = getDocumentDimensions();
console.log(dimensions.height);
console.log(dimensions.width);
canvas.height = dimensions.height; canvas.height = dimensions.height;
canvas.width = dimensions.width; canvas.width = dimensions.width;