C# Class HanoiTowers.Column

Inheritance: UnityEngine.MonoBehaviour
ファイルを表示 Open project: BrainProject/UnityTemp Class Usage Examples

Public Properties

Property Type Description
coloredLight UnityEngine.Light
ending bool
gameController GameController
starting bool

Public Methods

Method Description
Awake ( ) : void
OnMouseEnter ( ) : void

hightlight column on mouse enter

OnMouseExit ( ) : void

Turn off highlight on mouse exit

OnMouseUp ( ) : void

solve mouse click on this column.

Start ( ) : void
addDisk ( Disk newDisk ) : void

Add disk to this column

checkWinningCondition ( ) : void

Check if winning condidtions are fulfilled. If so, calls gameController.endGame()

getNumberofDisks ( ) : int

removeAllDisks ( ) : void
removeTopDisk ( ) : void
topDisk ( ) : Disk

Private Methods

Method Description
isValidTarget ( int diskSize ) : bool

Checks, if this column is valid target for disk of given size.

Method Details

Awake() public method

public Awake ( ) : void
return void

OnMouseEnter() public method

hightlight column on mouse enter
public OnMouseEnter ( ) : void
return void

OnMouseExit() public method

Turn off highlight on mouse exit
public OnMouseExit ( ) : void
return void

OnMouseUp() public method

solve mouse click on this column.
public OnMouseUp ( ) : void
return void

Start() public method

public Start ( ) : void
return void

addDisk() public method

Add disk to this column
public addDisk ( Disk newDisk ) : void
newDisk Disk reference to disk to be added
return void

checkWinningCondition() public method

Check if winning condidtions are fulfilled. If so, calls gameController.endGame()
public checkWinningCondition ( ) : void
return void

getNumberofDisks() public method

public getNumberofDisks ( ) : int
return int

removeAllDisks() public method

public removeAllDisks ( ) : void
return void

removeTopDisk() public method

public removeTopDisk ( ) : void
return void

topDisk() public method

public topDisk ( ) : Disk
return Disk

Property Details

coloredLight public_oe property

public Light,UnityEngine coloredLight
return UnityEngine.Light

ending public_oe property

public bool ending
return bool

gameController public_oe property

public GameController,HanoiTowers gameController
return GameController

starting public_oe property

public bool starting
return bool