/// <summary> /// Swaps turn to the next player (color) and sendt text info /// </summary> public void SwapTurn() { if (turn == ChessEnum.Color.White) { turn = ChessEnum.Color.Black; whiteTurnImg.SetActive(false); blackTurnImg.SetActive(true); } else { turn = ChessEnum.Color.White; whiteTurnImg.SetActive(true); blackTurnImg.SetActive(false); } GameObject.FindGameObjectWithTag("Timers").GetComponent <TimerCanvas>().turn = turn; //timer turn swap }
/// <summary> /// Start clock ad start of a game /// </summary> private void Start() { // Starts the timer automatically timerIsRunning = true; turn = ChessEnum.Color.White; }