diff --git a/sketch.js b/sketch.js index 4136cdb..98c7278 100644 --- a/sketch.js +++ b/sketch.js @@ -356,12 +356,12 @@ function startGame(full_start, update_objects) { size: 75, isFound: false, }; - // Checking whether the coin is over a canyon; + // Checking whether the coin is over a canyon; // marking it as isFound (making it disabled) in case if. for (k = 0; k < canyons.length; k++) { if ( - canyons[k].x - canyons[k].width / 2 < collectables[i].x - && + canyons[k].x - canyons[k].width / 2 < + collectables[i].x && canyons[k].x + canyons[k].width / 2 > collectables[i].x ) { collectables[i].isFound = true; @@ -846,4 +846,4 @@ function keyReleased() { console.log(frameCount + " released " + key + " " + keyCode); if (keyCode == 65 /*A*/) gameChar.isLeft = false; if (keyCode == 68 /*D*/) gameChar.isRight = false; -} +} \ No newline at end of file