프로퍼티 | 타입 | 설명 | |
---|---|---|---|
BOARD_GRID_SIZE | int | ||
blackPiecePrefab | |||
blackSquarePrefab | |||
redPiecePrefab | |||
whiteSquarePrefab |
메소드 | 설명 | |
---|---|---|
AddPlayerToken ( bool isRed, IntVector2 boardPosition ) : void |
Adds a player token of a given colour to the given coordinates.
|
|
BoardClicked ( IntVector2 boardPosition ) : void |
Callback for a tile getting clicked.
|
|
GetBoardState ( IntVector2 boardPosition ) : BoardState |
Get the state of the board at a given coordinate.
|
|
MovePlayerToken ( ) : void |
TODO: Implement for moving a player token. Note: The API can be changed, you can add functions, parameters, properties, whatever.
|
메소드 | 설명 | |
---|---|---|
Awake ( ) : void | ||
GetDirectionForIntVector ( IntVector2 vec ) : MoveDirection |
Gets the equivalent MoveDirection for an IntVector2.
|
|
InstantiateSquare ( |
Instantiate a given square prefab with the given coordinates. Set all the right properties and add it to the board.
|
|
IsValidBoardPosition ( IntVector2 boardPosition ) : bool |
Determines whether this instance is valid board position the specified boardPosition.
|
public AddPlayerToken ( bool isRed, IntVector2 boardPosition ) : void | ||
isRed | bool | If set to |
boardPosition | IntVector2 | The position on the board to add a player token to. |
리턴 | void |
public BoardClicked ( IntVector2 boardPosition ) : void | ||
boardPosition | IntVector2 | The position on the board that was clicked. |
리턴 | void |
public GetBoardState ( IntVector2 boardPosition ) : BoardState | ||
boardPosition | IntVector2 | The board position to get the state of. |
리턴 | BoardState |
public GameObject,UnityEngine blackPiecePrefab | ||
리턴 |
public GameObject,UnityEngine blackSquarePrefab | ||
리턴 |