Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Layers

The classes that represent the main screen’s layers are represented in Figure 23.10. The base Layer class contains a background Picture that scrolls repeatedly across the screen. The background is tiled horizontally to give the appearance of one never-ending surface. The two derived classes add some objects that are drawn on top of the background.

Figure 23.10. Three classes are used for the game’s layers.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint