Instant Actions
Instant actions are immediate actions. They don’t have a duration like the Interval Actions.
Bases: cocos.actions.base_actions.InstantAction
Place the CocosNode object in the position x,y.
Example:
action = Place( (320,240) )
sprite.do( action )
Init method.
Parameters: |
|
---|
Bases: cocos.actions.base_actions.InstantAction
An action that will call a function.
Example:
def my_func():
print "hello baby"
action = CallFunc( my_func )
sprite.do( action )
Bases: cocos.actions.instant_actions.CallFunc
An action that will call a funtion with the target as the first argument
Example:
def my_func( sprite ):
print "hello baby"
action = CallFuncS( my_func )
sprite.do( action )
Bases: cocos.actions.base_actions.InstantAction
Hides the CocosNode object. To show it again call the Show () action
Example:
action = Hide()
sprite.do( action )
Bases: cocos.actions.base_actions.InstantAction
Shows the CocosNode object. To hide it call the Hide () action
Example:
action = Show()
sprite.do( action )
Bases: cocos.actions.base_actions.InstantAction
Toggles the visible attribute of a CocosNode object
Example:
action = ToggleVisibility()
sprite.do( action )