Class cocos.actions.instant_actions.CallFunc

            object --+        
                     |        
   base_actions.Action --+    
                         |    
base_actions.InstantAction --+
                             |
                            CallFunc

An action that will call a function.

Example:

def my_func():
    print "hello baby"

action = CallFunc( my_func )
sprite.do( action )

Methods

  init(self, func, *args, **kwargs)
Gets called at initialization time, before a target is defined
  start(self)
Here we must do out stuff
  __deepcopy__(self, memo)
  __reversed__(self)
Inherited from base_actions.InstantAction: done, update Inherited from base_actions.Action: __add__, __init__, __mul__, __or__, step, stop Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Instance Variables

Inherited from base_actions.Action: target

Class Variables

Inherited from base_actions.InstantAction: duration

Method Details

init

init(self, func, *args, **kwargs)
Gets called at initialization time, before a target is defined
Overrides:
base_actions.Action.init

start

start(self)
Here we must do out stuff
Overrides:
base_actions.InstantAction.start

__reversed__

__reversed__(self)
Overrides:
base_actions.Action.__reversed__