+ 1
Cannot read property of "x"
It kept saying that the property of x is undefined, but this event would occur temporarily. When the bullet collides with the ufo. How could i fix that? for(var i = 0; i < numberOfFruits; i++){ const bulletsShooting = bullets.filter(element => element.isShooting === true) for(var bulletShooting of bulletsShooting){ if(Collide(bulletShooting, fruits[i])){ fruits.splice(fruits.indexOf(fruits[i]), 1) numberOfFruits -= 1 player.score += 10 } } } https://code.sololearn.com/W5Y5Nkm3A7jB/?ref=app
1 Resposta