Game Development Reference
In-Depth Information
s part when creating the touch event API
s very easy to
swap out mouse events for touch ones. Now, we
ll look at how this
class is used in the game.
Before we dig heavily into the code for the Game class, let
s look at
what is inside the game clip in the XFL document. I
ve grouped the dif-
ferent types of components into layers for easy access, per Figure 16.2 .
In the bottom-most layer is the basic line art for the rink,
encapsulated in a Sprite and set for bitmap caching. The second
layer contains the score display objects. They resemble text fields,
but they are actually MovieClips with the four possible score values
advancing over each frame. This would not be practical for a game
with an uncapped score, but for our purposes, it will work fine.
Figure 16.2
The game clip, layered in Flash.
Search Nedrilad ::

Custom Search