+ 1
Can anybody tell me why my colide detection codeblock is not working? And can you fix it ??
1 Odpowiedź
0
if (
birdleft + 34 > pipeleft && // Adjust the values based on your bird and pipe dimensions
birdleft < pipeleft + 70 && // Adjust the values based on your bird and pipe dimensions
(birdtop < holetop || birdtop + 24 > holetop + 100) // Adjust the values based on your bird and hole dimensions
) {
disp.style.display = "none";
gameover.style.display = "block";
}