Actions

Actions are like orders given to any CocosNode object. These actions usually modify some the object's attributes like position, rotation, scale, etc. If these attributes are modified during a period of time, they are IntervalAction actions, otherwise they are InstantAction actions.

For example, the MoveBy actions modifies the position attribute during a period of time, hence, it is an IntervalAction.

Example:

# Move a sprite 50 pixels to the right, and 100 pixel to the top in 2 seconds.
sprite.do( MoveBy( (50,100), duration=2 ) )

The IntervalAction actions have some interesting properties: