Descent.Model.Board.Board.IsThereLineOfSight C# (CSharp) Метод

IsThereLineOfSight() публичный Метод

Indicates whethere there's nothing in the way from one figure to another. Can ignore monsters.
public IsThereLineOfSight ( Figure from, Figure to, bool ignoreMonsters ) : bool
from Descent.Model.Player.Figure.Figure "From" figure.
to Descent.Model.Player.Figure.Figure "To" figure.
ignoreMonsters bool Will ignore monsters if true.
Результат bool
        public bool IsThereLineOfSight(Figure from, Figure to, bool ignoreMonsters)
        {
            Contract.Requires(from != null);
            Contract.Requires(to != null);
            Point[] fromPoints = FullModel.Board.FigureSquares(from);
            Point[] toPoints = FullModel.Board.FigureSquares(to);
            foreach (Point fromPoint in fromPoints)
            {
                foreach (Point toPoint in toPoints)
                {
                    if (IsThereLineOfSight(fromPoint, toPoint, ignoreMonsters)) return true;
                }
            }

            return false;
        }

Same methods

Board::IsThereLineOfSight ( Point from, Point to, bool ignoreMonsters ) : bool