public override void MakeMove(GridNode selectedNode, Vector2Int destination) { Vector2Int source = selectedNode.Position; Piece piece = SpaceManager.GridNodes[source.x][source.y].Piece; SpaceManager.GridNodes[destination.x][destination.y].MovePiece(piece); SpaceManager.GridNodes[source.x][source.y].MovePiece(null); piece.AfterMoveEffect(); }
protected void MovePiece(GridNode selectedNode, Vector2Int destination) { Piece piece = selectedNode.Piece; SpaceManager.GridNodes[destination.x][destination.y].MovePiece(piece); selectedNode.MovePiece(null); piece.AfterMoveEffect(); }