And action!—the engine class

The callback methods of the engine class are the ones that will finally control the player machine and check for collisions. They will also be responsible for what happens when a level has finished its fading out transition. We could also have checked for the winning conditions here, but have chosen to do it inside the OnUpdate method of the game class. You see that there is no strict rule to it. And that is a good thing!

Move it… object updates

To control the player's machine, we will detail the OnObjectUpdate callback method of the fantomEngine framework. Every time an object gets updated, fantomEngine will make a call to this method with the object as a parameter.

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

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