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

3. Game #2, Rocket Commander > Time for action — updating the launchers

Time for action — updating the launchers

To update all the launchers at once, call the function UpdateLaunchers, inside the UpdateGame method.

Method UpdateGame()
UpdateLaunchers()
Return True

What just happened?

The call of UpdateLaunchers in the game will check if their trigger keys were hit in each of existing rocket launchers, and then will fire a rocket.

Enhancing the UpdateMenu method

Now that we have the city and the launcher classes implemented, we can also finish the UpdateMenu method.


  

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