コード例 #1
0
 public void PieceWasClicked(Piece piece)
 {
     print("CountWhite: " + countWhitePieces());
     print("CountBlack: " + countBlackPieces());
     if (currentPiece != null)
     {
         currentPiece.RemoveHighlightPossibleMovements();
         currentPiece.RemoveHighlight();
     }
     Debug.Log("Piece was clicked");
     if (piece.GetPlayerNumber() == currentPlayerNumber)
     {
         piece.AddHighlightPossibleMovements();
         piece.AddHighlight();
         currentPiece = piece;
     }
 }