+ 4

Game Collision Detection Issue

Hi, i am trying to build a Block Breaker game and am struggling with the collision behaviour of the blocks. the blocks are stored in an array. i give every array item a custom eventlistener and check for collision with the ball in the function "moveBall"; if a collision is detected, the event is dispatched and the block should be removed from the field. however, the block removed is always the last in the block array. if you dont move the panel and wait for about 10 sec, the ball reaches the second row and the behaviour is even stranger: now all the blocks from the array index of collision to the array length are removed; can anyone help me with my problem? thank you 😃 https://code.sololearn.com/WYY3u607E2f8/?ref=app

10th Sep 2019, 3:01 PM
Daniel Asherov
2 Respuestas
+ 5
Daniel Asherov wait bro i will share your problem then you fix it your problem.. ok ☺☺☺👍👍👌👌👌 game is to good .👏👏👏
11th Sep 2019, 3:30 AM
🇮🇳Abhay Pratap Singh🇮🇳
🇮🇳Abhay Pratap Singh🇮🇳 - avatar