Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }