Class cocos.actions.basegrid_actions.TiledGrid3DAction

    base_actions.Action --+        
                          |        
base_actions.IntervalAction --+    
                              |    
                 GridBaseAction --+
                                  |
                                 TiledGrid3DAction
Known Subclasses:
tiledgrid_actions.FadeOutTRTiles, tiledgrid_actions.JumpTiles3D, tiledgrid_actions.ShakyTiles3D, tiledgrid_actions.ShatteredTiles3D, tiledgrid_actions.ShuffleTiles, tiledgrid_actions.SplitCols, tiledgrid_actions.SplitRows, tiledgrid_actions.TurnOffTiles, tiledgrid_actions.WavesTiles3D
Action that does transformations to a grid composed of tiles ( TiledGrid3D ). You can transform each tile individually

Methods

  get_grid(self)
  set_tile(self, x, y, coords)
Set the 4 tile coordinates
[ float, float, float, float, float, float, float, float, float, float, float, float ] get_original_tile(self, x, y)
Get the 4-original tile coordinates.
[ float, float, float, float, float, float, float, float, float, float, float, float ] get_tile(self, x, y)
Get the current tile coordinates.
  __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.Action)
  __mul__(self, other)
repeats ntimes the action action * n -> action_result where action result performs as: repeat n times the changes that action would do
(Inherited from cocos.actions.base_actions.IntervalAction)
  __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.basegrid_actions.GridBaseAction)
  done(self)
When in the worker role, this method is reliable.
(Inherited from cocos.actions.base_actions.IntervalAction)
  init(self, grid=(4, 4), duration=5)
Initialize the Grid Action
(Inherited from cocos.actions.basegrid_actions.GridBaseAction)
  start(self)
External code sets self.target and then calls this method.
(Inherited from cocos.actions.basegrid_actions.GridBaseAction)
  step(self, dt)
Dont customize this method: it will not be called when in the component role for certain composite actions (like Sequence_IntervalAction).
(Inherited from cocos.actions.base_actions.IntervalAction)
  stop(self)
When the action must cease to perform this function is called by external code; after this call no other method should be called.
(Inherited from cocos.actions.base_actions.Action)
  update(self, t)
Gets called on every frame 't' is the time elapsed normalized to [0, 1] If this action takes 5 seconds to execute, t will be equal to 0 at 0 seconds.
(Inherited from cocos.actions.base_actions.IntervalAction)

Instance Variables

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

Method Details

set_tile

set_tile(self, x, y, coords)

Set the 4 tile coordinates

Coordinates positions:

3 <-- 2
      ^
      |
0 --> 1
Parameters:
x : int
x coodinate of the tile
y : int
y coordinate of the tile
coords : [ float, float, float, float, float, float, float, float, float, float, float, float ]
The 4 coordinates in the format (x0, y0, z0, x1, y1, z1,..., x3, y3, z3)

get_original_tile

get_original_tile(self, x, y)

Get the 4-original tile coordinates.

Coordinates positions:

3 <-- 2
      ^
      |
0 --> 1
Parameters:
x : int
x coordinate of the tile
y : int
y coordinate of the tile
Returns:
[ float, float, float, float, float, float, float, float, float, float, float, float ]: The 4 coordinates with the following order: x0, y0, z0, x1, y1, z1,...,x3, y3, z3

get_tile

get_tile(self, x, y)

Get the current tile coordinates.

Coordinates positions:

3 <-- 2
      ^
      |
0 --> 1
Parameters:
x : int
x coordinate of the tile
y : int
y coordinate of the tile
Returns:
[ float, float, float, float, float, float, float, float, float, float, float, float ]: The 4 coordinates with the following order: x0, y0, z0, x1, y1, z1,...,x3, y3, z3