Graphics Programs Reference
In-Depth Information
Figure 6-11 . Targeting the enemy
Figure 6-12 . Enemy annihilated
Now, start inserting code in place of the cleared lines—i.e., after the aforementioned
if block, and before the call to the renderModel() method. First, create an if
block that tests whether there are any remaining Enemy objects. Inside it, initialize
the model matrix enemiesMMatrix (of type float[16] ). Then, start iterating
over the Enemy objects using a ListIterator (as shown in Listing 6-23 ) .
Listing 6-23. TANK FENCE GAME 6/src/com/apress/android/tankfencegame6/
Search WWH ::

Custom Search