Esempio n. 1
0
        public bool UpdateMovementTarget(int x, int y, Tile tile)
        {
            MovementTargetTile = tile;
            var square = tile[x, y];

            if (MovementTargetSquare == square ||
                CurrentSquare == square)
            {
                return(false);
            }
            MovementTargetSquare = square;
            PathToTarget         = BreadthFirstSearch.GetPathTo(MovementTargetSquare);
            return(PathToTarget != null && PathToTarget.Length != 0);
        }