I have multiple weapons firing and thus many weapon.bullets overlapping the enemy target, my problem is that i can’t get the child index of the overlapped weapon.bullets?
example:
here the array of all the weapon.bullets is called projectiles…
game.physics.arcade.overlap(projectiles, enemy, hit, null, this);
then on the function hit the findindex operation freezes the game:
function hit (bullets, enemy){
var index = projectiles.indexof(bullets);