Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
To act on timer events, we need to detail the OnObjectTimer method inside the engine class. We will set the ID of an object to positive once again, and then check for collisions of its child collision circles:
timerID is equal to g.tmObjSwitch.Method OnObjectTimer:Int(timerId:Int, obj:ftObject) If timerId = g.tmObjSwitch Then
id variable.Local id:Int = obj.GetID()
id is negative, set it back to positive.If id < 0 Then obj.SetID(obj.GetID()*-1)
For loop now, for every child collision circle of the object.For Local i:Int = 1 To obj.GetChildCount()
g.eng.CollisionCheck(obj.GetChild(i))