Class cocos.actions.tiledgrid_actions.JumpTiles3D

             object --+                
                      |                
    base_actions.Action --+            
                          |            
base_actions.IntervalAction --+        
                              |        
basegrid_actions.GridBaseAction --+    
                                  |    
 basegrid_actions.TiledGrid3DAction --+
                                      |
                                     JumpTiles3D

Odd tiles will perform a jump in the z-axis using the sine function, while the even tiles will perform a jump using sine+pi function

Example:

scene.do( JumpTiles3D( jumps=5, amplitude=40, grid=(16,16), duration=10) )

Methods

  init(self, jumps=4, amplitude=20, *args, **kw)
Initialize the Grid Action
  update(self, t)
Gets called on every frame.
Inherited from basegrid_actions.TiledGrid3DAction: get_grid, get_original_tile, get_tile, set_tile Inherited from basegrid_actions.GridBaseAction: __reversed__, start Inherited from base_actions.IntervalAction: done 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

  jumps
Total number of jumps to perform
  amplitude_rate
amplitude rate.
Inherited from base_actions.Action: target

Method Details

init

init(self, jumps=4, amplitude=20, *args, **kw)
Initialize the Grid Action
Parameters:
jumps : int
Number of jumps(2 * pi) that the action will perform. Default is 4
amplitude : int
Wave amplitude (height). Default is 20
Overrides:
basegrid_actions.GridBaseAction.init

update

update(self, t)
Gets called on every frame. t is in [0,1] If this action takes 5 seconds to execute, t will be equal to 0 at 0 seconds. t will be 0.5 at 2.5 seconds and t will be 1 at 5sec.
Overrides:
base_actions.IntervalAction.update

Instance Variable Details

amplitude_rate

amplitude rate. Default: 1.0 This value is modified by other actions like AccelAmplitude.