Ejemplo n.º 1
0
 public bool FindPath(Tile end, bool neighboursOk)
 {
     path = PathFinder.FindPath(World.current, pos, end, neighboursOk, neighboursOk);
     if (path != null && path.foundPath)
     {
         return(true);
     }
     else
     {
         path = null;
         return(false);
     }
 }
Ejemplo n.º 2
0
        public bool FindPath(int x, int y, bool neighboursOk)
        {
            Tile end = World.current.GetTileAt(x, y);

            if (end == null)
            {
                return(false);
            }

            path = PathFinder.FindPath(World.current, pos, end, neighboursOk, neighboursOk);
            if (path != null && path.foundPath)
            {
                return(true);
            }
            else
            {
                path = null;
                return(false);
            }
        }