C# Class CellGrid

CellGrid class keeps track of the game, stores cells, units and players objects. It starts the game and makes turn transitions. It reacts to user interacting with units or cells, and raises events related to game progress.
Inheritance: MonoBehaviour
Datei anzeigen Open project: TheJP/GlobalGameJam2016 Class Usage Examples

Public Properties

Property Type Description
PlayersParent Transform

Public Methods

Method Description
EndTurn ( ) : void

Method makes turn transitions. It is called by player at the end of his turn.

Start ( ) : void
StartGame ( ) : void

Method is called once, at the beggining of the game.

Private Methods

Method Description
OnCellClicked ( object sender, EventArgs e ) : void
OnCellDehighlighted ( object sender, EventArgs e ) : void
OnCellHighlighted ( object sender, EventArgs e ) : void
OnUnitClicked ( object sender, EventArgs e ) : void
OnUnitDestroyed ( object sender, AttackEventArgs, e ) : void

Method Details

EndTurn() public method

Method makes turn transitions. It is called by player at the end of his turn.
public EndTurn ( ) : void
return void

Start() public method

public Start ( ) : void
return void

StartGame() public method

Method is called once, at the beggining of the game.
public StartGame ( ) : void
return void

Property Details

PlayersParent public_oe property

public Transform PlayersParent
return Transform