Class cc.TurnOffTiles
- Defined in: CCActionTiledGrid.js
- Extends cc.TiledGrid3DAction
Constructor Attributes | Constructor Name and Description |
---|---|
cc.TurnOffTiles(duration, gridSize, seed)
cc.TurnOffTiles action.
|
Method Summary
Class Detail
cc.TurnOffTiles(duration, gridSize, seed)
cc.TurnOffTiles action.
Turn off the files in random order.
Reference the test cases (Effects Test)
Turn off the files in random order.
Reference the test cases (Effects Test)
// turnOffTiles without seed var toff = new cc.TurnOffTiles(this._duration, cc.size(x, y)); // turnOffTiles with seed var toff = new cc.TurnOffTiles(this._duration, cc.size(x, y), 0);
- Parameters:
- {Number} duration
- {cc.Size} gridSize
- {Number|Null} seed Optional, Default: 0
Field Detail
Please use cc.turnOffTiles instead.
Creates the action with a random seed, the grid size and the duration.
Reference the test cases (Effects Test)
Creates the action with a random seed, the grid size and the duration.
Reference the test cases (Effects Test)
- Deprecated:
-
since v3.0
Please use cc.turnOffTiles instead.
Method Detail
-
ctor(duration, gridSize, seed)Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
Creates the action with a random seed, the grid size and the duration.- Parameters:
- {Number} duration
- {cc.Size} gridSize
- {Number|Null} seed Optional, Default: 0
-
{Boolean} initWithDuration(duration, gridSize, seed)Initializes the action with a random seed, the grid size and the duration.
- Parameters:
- {Number} duration
- {cc.Size} gridSize
- {Number|Null} seed Optional, Default: 0
- Returns:
- {Boolean}
-
shuffle(array, len)Shuffle
- Parameters:
- {Array} array
- {Number} len
-
startWithTarget(target)called before the action start. It will also set the target.
- Parameters:
- {cc.Node} target
-
turnOffTile(pos)Turn off title.
- Parameters:
- {cc.Point} pos
-
turnOnTile(pos)Turn on tile.
- Parameters:
- {cc.Point} pos
-
update(dt)Called once per frame. Time is the number of seconds of a frame interval.
- Parameters:
- {Number} dt