Example #1
0
 public void SelectDefectOption(Color value)
 {
     if (GameManager.Instance.chessGame is ChessGameModes.SovereignChess)
     {
         defectToLbl.text = "Click the king again to defect to team\n<b>" + SovereignExtensions.GetColourName(value) + "</b>";
         ((ChessGameModes.SovereignChess)GameManager.Instance.chessGame).SetDefectOptionTo(value);
     }
 }
Example #2
0
 public void OnDisplayDefectionOptions(bool value)
 {
     if (GameManager.Instance.chessGame is ChessGameModes.SovereignChess)
     {
         defectToLbl.text = "Click the king again to defect to team\n<b>" + SovereignExtensions.GetColourName(((ChessGameModes.SovereignChess)GameManager.Instance.chessGame).selectedDefection).ToString() + "</b>";
     }
     else
     {
         if (value == true)
         {
             Debug.LogError("Wrong game mode! Do not use this method in any game mode other than Sovereign Chess.");
             return;
         }
     }
     defectionWindow.SetActive(value);
 }