Uhfgood Posted August 10, 2014 Share Posted August 10, 2014 I'm making an asteroids 'clone' -- and I want to respawn my player in the center when he gets hit, is there a way to detect with sprites in a group are in a certain area of the screen, or do I need to write a function that iterates through each asteroid and checks it manually? (or make a blank sprite somehow and then just do a regular collision check as per normal?) Thanks Link to comment Share on other sites More sharing options...
lewster32 Posted August 10, 2014 Share Posted August 10, 2014 The iteration approach would be the best, and much more efficient than a collision/overlap based approach. Link to comment Share on other sites More sharing options...
Uhfgood Posted August 10, 2014 Author Share Posted August 10, 2014 Interesting, I would have thought it would be better to let phaser do a check -- but okay, I can iterate through each active asteroid, and test to see if they're within a certain area. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts