Class cocos.actions.basegrid_actions.ReuseGrid

    base_actions.Action --+        
                          |        
base_actions.IntervalAction --+    
                              |    
     base_actions.InstantAction --+
                                  |
                                 ReuseGrid

Will reuse the current grid for the next grid action. The next grid action must have these properties:

If these condition are met, then the next grid action will receive as the original vertex or original tiles the current ones.

Example:

scene.do( Waves3D( duration=2) + ReuseGrid() + Lens3D(duration=2) )

Methods

  init(self, reuse_times=1)
Gets called by __init__ with all the parameteres received, At this time the target for the action is unknown.
  start(self)
Here we must do out stuff
  __add__(self, action)
sequence operator - concatenates actions action1 + action2 -> action_result where action_result performs as: first do all that action1 would do; then perform all that action2 would do
(Inherited from cocos.actions.base_actions.Action)
  __init__(self, *args, **kwargs)
dont override - use init
(Inherited from cocos.actions.base_actions.InstantAction)
  __mul__(self, other) (Inherited from cocos.actions.base_actions.InstantAction)
  __or__(self, action)
spawn operator - runs two actions in parallel action1 | action2 -> action_result
(Inherited from cocos.actions.base_actions.Action)
  __reversed__(self) (Inherited from cocos.actions.base_actions.Action)
  done(self)
When in the worker role, this method is reliable.
(Inherited from cocos.actions.base_actions.InstantAction)
  step(self, dt)
does nothing - dont override
(Inherited from cocos.actions.base_actions.InstantAction)
  stop(self)
does nothing - dont override
(Inherited from cocos.actions.base_actions.InstantAction)
  update(self, t)
does nothing - dont override
(Inherited from cocos.actions.base_actions.InstantAction)

Instance Variables

  target
CocosNode object that is the target of the action
(Inherited from cocos.actions.base_actions.Action)

Method Details

init

init(self, reuse_times=1)
Gets called by __init__ with all the parameteres received, At this time the target for the action is unknown. Typical use is store parameters needed by the action.
Parameters:
reuse_times : int
Number of times that the current grid will be reused by Grid actions. Default: 1
Overrides:
base_actions.Action.init

start

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