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
Share this Page URL
Help

4. Game #3, CometCrusher > Time for action — creating some layers

Time for action — creating some layers

Time for action — creating some layers We can use the following steps to create some layers: Add a new method called CreateLayers to the game class. Method CreateLayers:Int() Create the layers in the order they have to be rendered later on. layerBackGround = eng.CreateLayer() layerGame = eng.CreateLayer() layerFX = eng.CreateLayer() layerUI = eng.CreateLayer() layerTitle = eng.CreateLayer() layerScore = eng.CreateLayer() Close the method. Return 0 End Let them shine—the background stars The stars are objects of the layerBackground layer.

  

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