Chess Game  1.1.0
A full chess game for Unity
cgMenuScript Class Reference

This is the main menu script attached to the main menu prefab, it has a few buttons, check boxes and a slider to control game mode and difficulty. More...

Inherits MonoBehaviour.

Public Member Functions

void DifficultyChanged ()
 Difficulty slider changed. More...
 
void Play ()
 Start the game, initialize the chessboard prefab. More...
 
void ToggleMode ()
 Toggle which colors human controls. More...
 
void Quit ()
 Quit the game. More...
 

Public Attributes

Slider DifficultySlider
 The Difficulty Slider(min =1, max = 3) More...
 
Toggle HumanAsWhite
 Is a human controlling the white pieces? More...
 
Toggle HumanAsBlack
 Is a human controlling the black pieces? More...
 
Toggle DisplayAs3D
 Is a human controlling the black pieces? More...
 
Text ModeDisplayText
 The textfield to display the current mode, based on what colors are controlled by human. More...
 
Dropdown BoardType
 The textfield to display the current mode, based on what colors are controlled by human. More...
 
GameObject ChessBoard
 The chessboard prefab More...
 
GameObject ChessBoardTiny
 The chessboard prefab More...
 
cgChessBoardScript.BoardMode currentBoardMode
 The current mode. More...
 

Detailed Description

This is the main menu script attached to the main menu prefab, it has a few buttons, check boxes and a slider to control game mode and difficulty.

Member Function Documentation

◆ DifficultyChanged()

void cgMenuScript.DifficultyChanged ( )

Difficulty slider changed.

◆ Play()

void cgMenuScript.Play ( )

Start the game, initialize the chessboard prefab.

◆ Quit()

void cgMenuScript.Quit ( )

Quit the game.

◆ ToggleMode()

void cgMenuScript.ToggleMode ( )

Toggle which colors human controls.

Member Data Documentation

◆ BoardType

Dropdown cgMenuScript.BoardType

The textfield to display the current mode, based on what colors are controlled by human.

◆ ChessBoard

GameObject cgMenuScript.ChessBoard

The chessboard prefab

◆ ChessBoardTiny

GameObject cgMenuScript.ChessBoardTiny

The chessboard prefab

◆ currentBoardMode

cgChessBoardScript.BoardMode cgMenuScript.currentBoardMode

The current mode.

◆ DifficultySlider

Slider cgMenuScript.DifficultySlider

The Difficulty Slider(min =1, max = 3)

◆ DisplayAs3D

Toggle cgMenuScript.DisplayAs3D

Is a human controlling the black pieces?

◆ HumanAsBlack

Toggle cgMenuScript.HumanAsBlack

Is a human controlling the black pieces?

◆ HumanAsWhite

Toggle cgMenuScript.HumanAsWhite

Is a human controlling the white pieces?

◆ ModeDisplayText

Text cgMenuScript.ModeDisplayText

The textfield to display the current mode, based on what colors are controlled by human.


The documentation for this class was generated from the following file: