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 rockets

Add a call to the function UpdateRockets, inside the UpdateGame method.

Method UpdateGame()
UpdateLaunchers()
UpdateRockets()
Return True

What just happened?

That was quick, right? We have a class for our rockets now. We can create them easily and update them through a simple call of a function. Once they reach their target, they destroy themselves.

Rendering our furious rockets

To render all active rockets, we need to change the RenderGame 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