6. Cannon Game App
Objectives
In this chapter you’ll:
Create a simple game app that’s easy to code and fun to play.
Create a custom SurfaceView
subclass for displaying the game’s graphics from a separate thread of execution.
Draw graphics using Paint
s and a Canvas
.
Override View
’s onTouchEvent
method to fire a cannonball when the user touches the ...
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.