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

9. Game #8, Treasure Chest > Time for action — showing the menu

Time for action — showing the menu

The menu screen is shown using the following steps:

  1. Add the method ShowMenu into the game class.
    Method ShowMenu:Int()
    
  2. Set the game mode to gmMenu and activate layers with it. Then, close the method.
    gameMode = gmMenu
    ActivateLayer(gameMode)
    Return 0
    End
    

What just happened?

We created a simple method to display the menu 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