C# Класс PlayBoard

Play board.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
_center Vector3
_colorAccessible bool
_height int
_reset bool
_width int

Открытые методы

Метод Описание
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

Описание методов

AddPowerShard() публичный Метод

public AddPowerShard ( PowerShard, shard ) : void
shard PowerShard,
Результат void

ApplyPowerShards() публичный Метод

public ApplyPowerShards ( ) : void
Результат void

ColorAccessibleHexagons() публичный Метод

public ColorAccessibleHexagons ( Character, player ) : void
player Character,
Результат void

CreateHexagone() публичный Метод

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.
Результат Hexagon,

FindPathForCharacter() публичный Метод

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
Результат bool

GetGrid() публичный Метод

public GetGrid ( ) : List>
Результат List>

GetHexagone() публичный Метод

Gets the (x,y) hexagone.
public GetHexagone ( int x, int y ) : Hexagon,
x int The x coordinate.
y int The y coordinate.
Результат Hexagon,

GetRange() публичный Метод

public GetRange ( Range, r, Hexagon, source ) : List
r Range,
source Hexagon,
Результат List

PlayBoard() публичный Метод

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
Результат System.Collections.Generic

RemoveHexagone() публичный Метод

Removes and return the (x,y) hexagone.
public RemoveHexagone ( int x, int y ) : Hexagon,
x int The x coordinate.
y int The y coordinate.
Результат Hexagon,

RemovePowerShard() публичный Метод

public RemovePowerShard ( PowerShard, shard ) : void
shard PowerShard,
Результат void

ResetBoard() публичный Метод

public ResetBoard ( ) : void
Результат void

SetHexagone() публичный Метод

Sets the hexagone.
public SetHexagone ( Hexagon, hex, bool replace = true ) : bool
hex Hexagon, Hex.
replace bool If set to true replace.
Результат bool

UpdatePowerShards() публичный Метод

public UpdatePowerShards ( ) : void
Результат void

fieldOfView() публичный Метод

public fieldOfView ( Hexagon, source, Hexagon, destination ) : bool
source Hexagon,
destination Hexagon,
Результат bool

Описание свойств

_center публичное свойство

public Vector3 _center
Результат Vector3

_colorAccessible публичное свойство

public bool _colorAccessible
Результат bool

_height публичное свойство

The height of board.
public int _height
Результат int

_reset публичное свойство

public bool _reset
Результат bool

_width публичное свойство

The width of board.
public int _width
Результат int