O'Reilly logo

Monkey Game Development by Michael Hartlef

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required