February 2016
Beginner to intermediate
500 pages
187h 36m
English
GameElementClass GameElement (Fig. 6.7)—the superclass of the Blocker, Target and Cannonball—contains the common data and functionality of an object that moves in the Cannon Game app.
GameElement class represents a rectangle-bounded game element
The GameElement constructor receives a reference to the CannonView (Section 6.13), which implements the game’s logic and draws the game elements. The constructor receives an int representing the GameElement’s 32-bit color, and an int representing the ID of a sound that’s associated with this GameElement. The ...
Read now
Unlock full access