Time for action — creating some layers

We can use the following steps to create some layers:

  1. Add a new method called CreateLayers to the game class.
    Method CreateLayers:Int()
    
  2. 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()
    
  3. Close the method.
    Return 0
    End
    

Let them shine—the background stars

The stars are objects of the layerBackground layer.

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

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