6.8.2. Instance Variables and Constants
Figure 6.8 lists the large number of class CannonView
’s constants and instance variables. Most are self documenting, but we’ll explain each as we encounter it in the discussion.
25 public class CannonView extends SurfaceView26 implements SurfaceHolder.Callback 27 {28 private static final String TAG = "CannonView"; // for logging errors29 30 private CannonThread cannonThread; // controls the game loop31 private Activity activity; // to display Game Over dialog in GUI thread32 private boolean dialogIsDisplayed = false;33 34 // constants for game play35 public static final int TARGET_PIECES = 7; // sections in the target36 public ...
Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.