Spaces:
Running
Running
Update script.js
Browse files
script.js
CHANGED
@@ -157,7 +157,6 @@ function createBonus() {
|
|
157 |
}
|
158 |
|
159 |
// Collision detection
|
160 |
-
/*
|
161 |
function checkCollision(a, b) {
|
162 |
const aRect = a.getBoundingClientRect();
|
163 |
const bRect = b.getBoundingClientRect();
|
@@ -169,7 +168,7 @@ function checkCollision(a, b) {
|
|
169 |
aRect.left > bRect.right
|
170 |
);
|
171 |
}
|
172 |
-
|
173 |
// Increase difficulty
|
174 |
function increaseDifficulty() {
|
175 |
orbSpeed += 0.1;
|
|
|
157 |
}
|
158 |
|
159 |
// Collision detection
|
|
|
160 |
function checkCollision(a, b) {
|
161 |
const aRect = a.getBoundingClientRect();
|
162 |
const bRect = b.getBoundingClientRect();
|
|
|
168 |
aRect.left > bRect.right
|
169 |
);
|
170 |
}
|
171 |
+
|
172 |
// Increase difficulty
|
173 |
function increaseDifficulty() {
|
174 |
orbSpeed += 0.1;
|