Пример #1
0
 public PathReturn(int id, PathfindingResult result, List <Point3> path, PathFound callback, IPathfindingGrid grid)
 {
     ID       = id;
     Result   = result;
     Path     = path;
     Callback = callback;
     Grid     = grid;
 }
Пример #2
0
 private PathfindingRequest(IPathfindingGrid grid, int id, Point3 start, Point3 end, PathFound foundEvent, bool overSized, List <Point3> path)
 {
     Start       = start;
     End         = end;
     ReturnEvent = foundEvent;
     Path        = path;
     Grid        = grid;
     ID          = id;
     IsOversized = overSized;
 }
Пример #3
0
        public static PathfindingRequest Create(IPathfindingGrid grid, int id, Point3 start, Point3 end, PathFound foundEvent, bool overSized, List <Point3> path)
        {
            PathfindingRequest r;

            if (_pooled.Count > 0)
            {
                r             = _pooled.Dequeue();
                r.Start       = start;
                r.End         = end;
                r.ReturnEvent = foundEvent;
                r.Path        = path;
                r.ID          = id;
                r.Grid        = grid;
                r.IsOversized = overSized;
            }
            else
            {
                r = new PathfindingRequest(grid, id, start, end, foundEvent, overSized, path);
            }
            World.Get <PathfindingSystem>().Enqueue(r);
            return(r);
        }
Пример #4
0
 public PathfinderMoverSystem()
 {
     _grid = World.Get <PathfindingSystem>().Grid;
     NodeFilter <PathfindMoverNode> .New(PathfindMoverNode.GetTypes());
 }
Пример #5
0
 public void InitForGrid(IPathfindingGrid grid)
 {
     throw new NotImplementedException();
 }