Cocos2d-x  v3.11
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
TurnOffTiles Class Reference

TurnOffTiles action. More...

Inherits TiledGrid3DAction.

Public Member Functions

void shuffle (unsigned int *array, unsigned int len)
 Shuffle the array specified. More...
 
void turnOnTile (const Vec2 &pos)
 Show the tile at specified position. More...
 
void turnOffTile (const Vec2 &pos)
 Hide the tile at specified position. More...
 
virtual TurnOffTilesclone () const override
 override Action.
 
- Public Member Functions inherited from TiledGrid3DAction
Quad3 getTile (const Vec2 &position) const
 Get the tile that belongs to a certain position of the grid. More...
 
Quad3 tile (const Vec2 &position)
Quad3 getOriginalTile (const Vec2 &position) const
 Get the non-transformed tile that belongs to a certain position of the grid. More...
 
Quad3 originalTile (const Vec2 &position)
void setTile (const Vec2 &position, const Quad3 &coords)
 Set a new tile to a certain position of the grid. More...
 
virtual GridBasegetGrid () override
 returns the grid
 
- Public Member Functions inherited from GridAction
virtual GridActionreverse () const override
 override Action.
 
- Public Member Functions inherited from ActionInterval
float getElapsed (void)
 How many seconds had elapsed since the actions started to run. More...
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction. More...
 
float getAmplitudeRate (void)
 Gets the ampliture rate, extension in GridAction. More...
 
virtual bool isDone (void) const override
 override Action.
 

Static Public Member Functions

static TurnOffTilescreate (float duration, const Size &gridSize)
 Create the action with the grid size and the duration. More...
 
static TurnOffTilescreate (float duration, const Size &gridSize, unsigned int seed)
 Create the action with the grid size, the duration and random seed. More...
 
- Static Public Member Functions inherited from TiledGrid3DAction
static TiledGrid3DActioncreate (float duration, const Size &gridSize)
 Create the action with size and duration. More...
 

Protected Member Functions

bool initWithDuration (float duration, const Size &gridSize, unsigned int seed)
 Initializes the action with grid size, random seed and duration. More...
 
- Protected Member Functions inherited from GridAction
bool initWithDuration (float duration, const Size &gridSize)
 Initializes the action with size and duration. More...
 
- Protected Member Functions inherited from ActionInterval
bool initWithDuration (float d)
 initializes the action with the duration. More...
 

Detailed Description

TurnOffTiles action.

Turn off the target node with many tiles in random order.

Member Function Documentation

static TurnOffTiles* create ( float  duration,
const Size gridSize 
)
static

Create the action with the grid size and the duration.

Specify the duration of the TurnOffTiles action. It's a value in seconds. Specify the size of the grid. If the creation success, return a pointer of TurnOffTiles action; otherwise, return nil.

static TurnOffTiles* create ( float  duration,
const Size gridSize,
unsigned int  seed 
)
static

Create the action with the grid size, the duration and random seed.

Specify the duration of the TurnOffTiles action. It's a value in seconds. Specify the size of the grid. Specify the random seed. If the creation success, return a pointer of TurnOffTiles action; otherwise, return nil.

void shuffle ( unsigned int *  array,
unsigned int  len 
)

Shuffle the array specified.

The array will be shuffled. The size of the array.

void turnOnTile ( const Vec2 pos)

Show the tile at specified position.

The position index of the tile should be shown.

void turnOffTile ( const Vec2 pos)

Hide the tile at specified position.

The position index of the tile should be hide.

bool initWithDuration ( float  duration,
const Size gridSize,
unsigned int  seed 
)
protected

Initializes the action with grid size, random seed and duration.

Specify the duration of the TurnOffTiles action. It's a value in seconds. Specify the size of the grid. Specify the random seed. If the Initialization success, return true; otherwise, return false.


The documentation for this class was generated from the following file: