public static void VisitAllObjects(float x, float y, Map map, Notifier visitor, float radius, bool dont_load = true) { CellCoord p = GridDefines.ComputeCellCoord(x, y); Cell cell = new Cell(p); if (dont_load) { cell.SetNoCreate(); } Visitor wnotifier = new Visitor(visitor, GridMapTypeMask.AllWorld); cell.Visit(p, wnotifier, map, x, y, radius); Visitor gnotifier = new Visitor(visitor, GridMapTypeMask.AllGrid); cell.Visit(p, gnotifier, map, x, y, radius); }
public static void VisitAllObjects(WorldObject center_obj, Notifier visitor, float radius, bool dont_load = true) { CellCoord p = GridDefines.ComputeCellCoord(center_obj.GetPositionX(), center_obj.GetPositionY()); Cell cell = new Cell(p); if (dont_load) { cell.SetNoCreate(); } Visitor wnotifier = new Visitor(visitor, GridMapTypeMask.AllWorld); cell.Visit(p, wnotifier, center_obj.GetMap(), center_obj, radius); Visitor gnotifier = new Visitor(visitor, GridMapTypeMask.AllGrid); cell.Visit(p, gnotifier, center_obj.GetMap(), center_obj, radius); }