Chess Game
1.1.0
A full chess game for Unity
|
Inherits MonoBehaviour.
Public Types | |
enum | Type { WhitePawn = 1, WhiteRook = 2, WhiteKnight = 3, WhiteBishop = 4, WhiteQueen = 5, WhiteKing = 6, Empty = 0, BlackPawn = -1, BlackRook = -2, BlackKnight = -3, BlackBishop = -4, BlackQueen = -5, BlackKing = -6 } |
All possible chess types. More... | |
Public Member Functions | |
void | generate (List< sbyte > customPlacements=null) |
Public Attributes | |
GameObject | whiteSquarePrefab |
The prefab used when generating white squares. More... | |
GameObject | blackSquarePrefab |
The prefab used when generating black squares. More... | |
GameObject | piecePrefab |
The prefab used when generating pieces. More... | |
Vector2 | squareSpacing = new Vector2(.6f, .6f) |
Determines the spacing of generated squares. More... | |
Vector2 | squareScale = new Vector2(1f, 1f) |
Determines the scale of squares. More... | |
cgChessBoardScript | boardScript |
The cgChessBoardScript. More... | |
byte | boardWidth = 6 |
The desired width of the generated board. More... | |
byte | boardHeight = 7 |
The desired height of the generated board. More... | |
bool | use3d = false |
Should it be displayed as 3d? More... | |
Vector3 | squareStartPoint = new Vector3(-2.2f,2.2f,0) |
The top left starting point of the board, where the first square is placed, dictating the placement of all following squares. More... | |
bool | customizePlacements = false |
Do you want to customize placements(true)? Or cram the default positions onto your generated board(Note: if width is less that 5 no king will be placed). More... | |
Type [] | piecePlacements |
The placement of pieces on the generated board. More... | |
|
strong |
All possible chess types.
GameObject cgBoardGeneratorScript.blackSquarePrefab |
The prefab used when generating black squares.
byte cgBoardGeneratorScript.boardHeight = 7 |
The desired height of the generated board.
cgChessBoardScript cgBoardGeneratorScript.boardScript |
The cgChessBoardScript.
byte cgBoardGeneratorScript.boardWidth = 6 |
The desired width of the generated board.
bool cgBoardGeneratorScript.customizePlacements = false |
Do you want to customize placements(true)? Or cram the default positions onto your generated board(Note: if width is less that 5 no king will be placed).
Type [] cgBoardGeneratorScript.piecePlacements |
The placement of pieces on the generated board.
GameObject cgBoardGeneratorScript.piecePrefab |
The prefab used when generating pieces.
Vector2 cgBoardGeneratorScript.squareScale = new Vector2(1f, 1f) |
Determines the scale of squares.
Vector2 cgBoardGeneratorScript.squareSpacing = new Vector2(.6f, .6f) |
Determines the spacing of generated squares.
Vector3 cgBoardGeneratorScript.squareStartPoint = new Vector3(-2.2f,2.2f,0) |
The top left starting point of the board, where the first square is placed, dictating the placement of all following squares.
bool cgBoardGeneratorScript.use3d = false |
Should it be displayed as 3d?
GameObject cgBoardGeneratorScript.whiteSquarePrefab |
The prefab used when generating white squares.