hi all , so i understandly fully how i use a for loop to run through a list of meteors to check for collision with the player1 but when it comes to wanting to check meteor list collision with bullet list whats the general jist behind it?
surely you dont do a for loop and check bullet 1 with every meteor?
this is what i was looking at but am i going about it wrong or is there much quicker way? or is this good enough or wont it work and i have missed something?
surely you dont do a for loop and check bullet 1 with every meteor?
int bulletIndex = 0; while (bulletIndex!= bullet.Count) { for( i = 0 , i < meteor.count ,i++) { if (meteor[i].intersects(bullet[bulletIndex])) { change scores , play sound for hitting meteor and remove meteors from list and make invisible? } } bulletIndex++; )
this is what i was looking at but am i going about it wrong or is there much quicker way? or is this good enough or wont it work and i have missed something?