Time for action — detailing the OnObjectTransition method

Inside this method, we will only check for the transition ID, and if positive, we will delete the object.

Check whether the transition ID is equal to g.triDelete. If yes, then call the Remove method of the object.

Method OnObjectTransition:Int(transId:Int, obj:ftObject)
If transId = g.triDelete Then obj.Remove()
Return 0
End

What just happened?

With this method, you can now use a single line, to automatically delete an object once its transition is done. We use it when a particle has faded out or reached its maximum scale factor.

Controlling the player plane—acting on object update events

To control the player plane, you need to detail the OnObjectUpdate callback method of the engine class.

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

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