howdy folks,
so I have been working with nape for some time, but there has been something that has plagued my mind for some time & that is having an array of objects that have a life, & delete once that life has gotten to 0.
I have a player entity & have linked a collision type to the player as well as the the array of enemies.
but what seems to be happening, is that they delete in odd orders. say if im hitting one of about 6, it may delete one across the other side of the screen, rather than the one that im actually hitting.
this is just confusing me beyond belief. as I have the deletion of objects & even with the sprite working completely fine, its just that they dont delete in the right order. im using a while loop as well that has allowed with other projects & shapes to delete in a different order to how they are spawned. but, damn its really not working & I feel at both a loss & completely confused.
ill look to post some code, but its currently a mess & im just starting again for the third time to really understand why this is not working.
if anyone has any pointers, please do share, im just running into complete blanks since I feel I have tried so much.
ive got a feeling its a simple answer & ive just not seen it since ive been looking at the code & methods so much its right in front of me
all the best