User prompt
The game end 1 score
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'intersects')' in or related to this line: 'if (bullets[j].intersects(animes[l])) {' Line Number: 154
User prompt
Add the animes in the game
User prompt
Game speed increase 5time
User prompt
Add a space theme in the background on the game
User prompt
Add a sound
User prompt
Add score board
Initial prompt
Ap
===================================================================
--- original.js
+++ change.js
@@ -138,9 +138,9 @@
break;
}
}
for (var l = animes.length - 1; l >= 0; l--) {
- if (bullets[j].intersects(animes[l])) {
+ if (bullets[j] && bullets[j].intersects(animes[l])) {
bullets[j].destroy();
bullets.splice(j, 1);
animes[l].destroy();
animes.splice(l, 1);