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
Listing 6-23.
TANK FENCE GAME 6/src/com/apress/android/tankfencegame6/
GLES20Renderer.java

Search WWH ::

Custom Search