HTML and CSS Reference
In-Depth Information
5. Loop though playerMissiles and check against the saucers , and then loop through
the saucers to check against the player .
6. When all the collision-detection routines are complete, reloop through each object ar-
ray (backward this time) and remove all the objects with true as a hit attribute.
We have used both methods—and variations—on each. While the second method is a little
cleaner, this final loop through all of the objects might add more processor overhead when
od to you as an exercise, in case you want to test it.
Search WWH ::

Custom Search