AABB collision
I'm having some problems with the AABB collision code
Link Of My Game: https//microstudio.io/rianstar/ghosthunt/
Thank You For The Help
I'm having some problems with the AABB collision code
Link Of My Game: https//microstudio.io/rianstar/ghosthunt/
Thank You For The Help
main file
update = function()
..........
for i = enemies.length - 1 to 0 by -1
local e = enemies[i]
for j = ghost.bullets.length - 1 to 0 by -1
local b = ghost.bullets[ j ]
if AABB( e, b) then
enemies.removeAt( i )
ghost.bullets.removeAt( j )
end
end
end
...........