6. Cannon Game App


Objectives

In this chapter you’ll:

Image Create a simple game app that’s easy to code and fun to play.

Image Create a custom SurfaceView subclass for displaying the game’s graphics from a separate thread of execution.

Image Draw graphics using Paints and a Canvas.

Image Override View’s onTouchEvent method to fire a cannonball when the user touches the screen.

Image Perform simple collision detection.

Image Add sound to your app using a SoundPool and the AudioManager.

Image Override Fragment lifecycle methods onPause and onDestroy.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset