public virtual void ExecuteMovement() { Figure.setPosition(Destination); FigureController fc = GameObject.FindGameObjectsWithTag("Figure") .Select(f => f.GetComponent <FigureController>()) .Where(c => c.Figure.Equals(Figure)) .FirstOrDefault(); fc.SetTargetPosition(Destination); Board.isCheck(); Figure.PossibleMoves.Clear(); }
public override void ExecuteMovement() { rook.setPosition(rookDestination); FigureController fc = GameObject.FindGameObjectsWithTag("Figure") .Select(f => f.GetComponent <FigureController>()) .Where(c => c.Figure.Equals(Rook)) .FirstOrDefault(); fc.SetTargetPosition(RookDestination); Figure.PossibleMoves.Clear(); base.ExecuteMovement(); }