The engine
class is the heart of the game. fantomEngine supports several callback methods which it calls automatically when certain things happen. For an example, a collision check was successful, a touch check to an object was positive, and so on.
In the OnObjectTouch
method, you will use transitions. Hmm What are they, you might ask. A transition of an object is an automatic change of the position, angle, size, color, or alpha value, over a defined period of time.
For example, you tell the engine to move an object to a certain point within 2000 milliseconds and forget about it. The engine will do that automatically for you. If you had set a transition ID when you created one, the engine will call the OnObjectTransition
method after the former transition is finished. Very convenient, isn't it?