Module cocos.sprite

Sprite

Animating a sprite

To execute any action you need to create an action:

move = MoveBy( (50,0), 5 )

In this case, move is an action that will move the sprite 50 pixels to the right (x coordinate) and 0 pixel in the y coordinate in 5 seconds.

And now tell the sprite to execute it:

sprite.do( move )

Classes

  Sprite
Sprites are sprites that can execute actions.