//***************** // call to the movement function in this case //******************* public void onClickSquare() { if (canMove) { if (pieceToCapture != null) { piecemovScript.movePiece(gameObject, pieceToCapture); } else { piecemovScript.movePiece(gameObject, null); } } }