Graphics Programs Reference
In-Depth Information
Figure 6-4 . Using the modified value of slope: Tank directed along Y axis
Figure 6-5 . Using the modified value of slope: Tank directed along X axis
In class Main ( TANK FENCE GAME 2/src/com/apress/android/tank-
fencegame2/Main.java ), in the setUpDownClickListeners() method,
get a reference to the fire button. Then, set its click listener as shown in the following
code:
buttonMissile.setOnClickListener(new OnClickListener()
{
public void onClick(View v) {
 
 
Search WWH ::




Custom Search