C# Class TileScript, Imagine_diamond-miner

Inheritance: MonoBehaviour
Show file Open project: Microsoft/Imagine_diamond-miner Class Usage Examples

Public Methods

Method Description
Explode ( float delay ) : bool

Explodes the tile after a delay.

Initialize ( int diamonds, int xCoord, int yCoord, LevelScript, inLevel ) : void

Initializes the tile with new data.

OnRecycle ( ) : void

Called when the tile is about to be returned to the object pool.

PlayAnimation ( ) : void

Plays the hint animation on this tile.

Private Methods

Method Description
DoExplode ( ) : void

Explodes the tile, spawning effects as necessary.

GetGrassChild ( ) : GameObject

Gets the child grass covering for this tile, if it exists.

OnClicked ( ) : void

Called when the player clicks on this tile.

SpawnExplosion ( ) : void

Spawn an overhead explosion animation.

Start ( ) : void
Update ( ) : void

Method Details

Explode() public method

Explodes the tile after a delay.
public Explode ( float delay ) : bool
delay float The delay before exploding, in seconds.
return bool

Initialize() public method

Initializes the tile with new data.
public Initialize ( int diamonds, int xCoord, int yCoord, LevelScript, inLevel ) : void
diamonds int Number of diamonds in the tile.
xCoord int x-position in the grid for the tile.
yCoord int y-position in the grid for the tile.
inLevel LevelScript, Reference to the level the tile is in.
return void

OnRecycle() public method

Called when the tile is about to be returned to the object pool.
public OnRecycle ( ) : void
return void

PlayAnimation() public method

Plays the hint animation on this tile.
public PlayAnimation ( ) : void
return void