public void OnPointerDown(PointerEventData eventData) { if (updating) { return; } Debug.Log(transform.name); mp.MovePiece(this); }
public void HandleClick(Cell cell) { if (movePieces.pieceToMove) { if (cell.IsMoveAllowed) { movePieces.MovePiece(cell); } movePieces.pieceToMove = null; Cell.Unselect(); } else if (cell.PlacedPiece) { movePieces.pieceToMove = cell.PlacedPiece; ExternalRules.Instance.TrySetCurrentPawn(cell.PlacedPiece); movePieces.pieceToMove.GetPossibleMoves(); } else { Cell.Unselect(); } }