C# Class PlayBoard

Play board.
Exibir arquivo Open project: LilTsubaki/Les-fragments-d-Erule Class Usage Examples

Public Properties

Property Type Description
_center Vector3
_colorAccessible bool
_height int
_reset bool
_width int

Public Methods

Method Description
AddPowerShard ( PowerShard, shard ) : void
ApplyPowerShards ( ) : void
ColorAccessibleHexagons ( Character, player ) : void
CreateHexagone ( int x, int y, bool replace = false ) : Hexagon,

Creates the (x,y) hexagone.

FindPathForCharacter ( Character, character, Hexagon, hexagon ) : bool

Register the path a character can follow later. The path is registered in character._pathToFollow

GetGrid ( ) : List>
GetHexagone ( int x, int y ) : Hexagon,

Gets the (x,y) hexagone.

GetRange ( Range, r, Hexagon, source ) : List
PlayBoard ( int width, int height ) : System.Collections.Generic

Initializes a new instance of the PlayBoard class.

RemoveHexagone ( int x, int y ) : Hexagon,

Removes and return the (x,y) hexagone.

RemovePowerShard ( PowerShard, shard ) : void
ResetBoard ( ) : void
SetHexagone ( Hexagon, hex, bool replace = true ) : bool

Sets the hexagone.

UpdatePowerShards ( ) : void
fieldOfView ( Hexagon, source, Hexagon, destination ) : bool

Method Details

AddPowerShard() public method

public AddPowerShard ( PowerShard, shard ) : void
shard PowerShard,
return void

ApplyPowerShards() public method

public ApplyPowerShards ( ) : void
return void

ColorAccessibleHexagons() public method

public ColorAccessibleHexagons ( Character, player ) : void
player Character,
return void

CreateHexagone() public method

Creates the (x,y) hexagone.
public CreateHexagone ( int x, int y, bool replace = false ) : Hexagon,
x int The x coordinate.
y int The y coordinate.
replace bool If set to true replace.
return Hexagon,

FindPathForCharacter() public method

Register the path a character can follow later. The path is registered in character._pathToFollow
public FindPathForCharacter ( Character, character, Hexagon, hexagon ) : bool
character Character, The character to move
hexagon Hexagon, The hexagon the character will try to reach
return bool

GetGrid() public method

public GetGrid ( ) : List>
return List>

GetHexagone() public method

Gets the (x,y) hexagone.
public GetHexagone ( int x, int y ) : Hexagon,
x int The x coordinate.
y int The y coordinate.
return Hexagon,

GetRange() public method

public GetRange ( Range, r, Hexagon, source ) : List
r Range,
source Hexagon,
return List

PlayBoard() public method

Initializes a new instance of the PlayBoard class.
public PlayBoard ( int width, int height ) : System.Collections.Generic
width int Width of board
height int Height of board
return System.Collections.Generic

RemoveHexagone() public method

Removes and return the (x,y) hexagone.
public RemoveHexagone ( int x, int y ) : Hexagon,
x int The x coordinate.
y int The y coordinate.
return Hexagon,

RemovePowerShard() public method

public RemovePowerShard ( PowerShard, shard ) : void
shard PowerShard,
return void

ResetBoard() public method

public ResetBoard ( ) : void
return void

SetHexagone() public method

Sets the hexagone.
public SetHexagone ( Hexagon, hex, bool replace = true ) : bool
hex Hexagon, Hex.
replace bool If set to true replace.
return bool

UpdatePowerShards() public method

public UpdatePowerShards ( ) : void
return void

fieldOfView() public method

public fieldOfView ( Hexagon, source, Hexagon, destination ) : bool
source Hexagon,
destination Hexagon,
return bool

Property Details

_center public_oe property

public Vector3 _center
return Vector3

_colorAccessible public_oe property

public bool _colorAccessible
return bool

_height public_oe property

The height of board.
public int _height
return int

_reset public_oe property

public bool _reset
return bool

_width public_oe property

The width of board.
public int _width
return int