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

The square script should be attached to a gameobject, there should be 64, they should be placed and named according to where on the board theyre located More...

Inherits MonoBehaviour.

Public Member Functions

void addDebugText ()
 This adds a small text on the location specifying the name in both index and coordinate form. More...
 
void highlightTemporarily (Color highlightColor)
 Temporarily highlight this square with provided color. More...
 
void changeColor (Color color)
 Change the color of this square. More...
 

Public Attributes

string uniqueName
 The unique name is used to extensively to place pieces on their correct square, the name should always be marked correctly. More...
 
Color startColor
 
Color recentMoveColor = Color.red
 
Color legalMoveToColor = Color.magenta
 

Detailed Description

The square script should be attached to a gameobject, there should be 64, they should be placed and named according to where on the board theyre located

Member Function Documentation

◆ addDebugText()

void cgSquareScript.addDebugText ( )

This adds a small text on the location specifying the name in both index and coordinate form.

◆ changeColor()

void cgSquareScript.changeColor ( Color  color)

Change the color of this square.

Parameters
color

◆ highlightTemporarily()

void cgSquareScript.highlightTemporarily ( Color  highlightColor)

Temporarily highlight this square with provided color.

Parameters
highlightColor

Member Data Documentation

◆ uniqueName

string cgSquareScript.uniqueName

The unique name is used to extensively to place pieces on their correct square, the name should always be marked correctly.


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