Module cocos.actions.base_actions

Base actions

Base Actions

These actions are the 'mother' of all actions. They are the building blocks.

Classes

  Action
Mother of all actions
  IntervalAction
IntervalAction()
  InstantAction
Instant actions are actions that happen just one call.
  Sequence
Run actions sequentially: One after another You can sequence actions using:
  Spawn
Spawn a new action immediately.
  Repeat
Repeats an action forever.
  _ReverseTime
Executes an action in reverse order, from time=duration to time=0

Functions

  Reverse(action)
Reverses the behavior of the action

Function Details

Reverse

Reverse(action)

Reverses the behavior of the action

Example:

# rotates the sprite 180 degrees in 2 seconds counter clockwise
action = Reverse( RotateBy( 180, 2 ) )
sprite.do( action )