Chess Game  1.1.0
A full chess game for Unity
All Classes Functions Variables Enumerations Properties
cgGameOverScript Class Reference

This is the game over script attached to the game over prefab, it shows a simple text and a few buttons to take the player back to a new game or the menu. More...

Inherits MonoBehaviour.

Public Member Functions

void initialize (string text, Action resetBoard, Action mainMenu)
 initialize the prefab, provide callback functions and display a win/lose/draw message. More...
 
void ResetBoard ()
 Reset board, if a callback has been provided then call it. More...
 
void MainMenu ()
 Go to main menu, if a callback has been provided then call it. More...
 

Public Attributes

Text displayText
 The text to display win/lose/draw message. More...
 
Button ResetButton
 Reset button. More...
 
Button MainMenuButton
 Main menu button More...
 

Detailed Description

This is the game over script attached to the game over prefab, it shows a simple text and a few buttons to take the player back to a new game or the menu.

Member Function Documentation

◆ initialize()

void cgGameOverScript.initialize ( string  text,
Action  resetBoard,
Action  mainMenu 
)

initialize the prefab, provide callback functions and display a win/lose/draw message.

Parameters
textwin/lose/draw message
resetBoardReset board callback
mainMenuGo to main menu callback

◆ MainMenu()

void cgGameOverScript.MainMenu ( )

Go to main menu, if a callback has been provided then call it.

◆ ResetBoard()

void cgGameOverScript.ResetBoard ( )

Reset board, if a callback has been provided then call it.

Member Data Documentation

◆ displayText

Text cgGameOverScript.displayText

The text to display win/lose/draw message.

◆ MainMenuButton

Button cgGameOverScript.MainMenuButton

Main menu button

◆ ResetButton

Button cgGameOverScript.ResetButton

Reset button.


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