/// <summary> /// Initializes the navigation grid manager. /// </summary> /// <param name="worldSize">World bounds.</param> public static void Initialize(Rectangle worldSize) { navigationGrids.Clear(); NavigationGrid grid = new NavigationGrid(64, worldSize, new LayerType[] { LayerType.MapTile, LayerType.Glass }); navigationGrids.Add("humangrid", grid); NavGrids = navigationGrids.Values.ToArray(); }
/// <summary> /// Draws a debug overlay for the navigation grids. /// </summary> /// <param name="batch">Sprite-batch to draw into.</param> public static void DebugDraw(Camera2D camera, SpriteBatch batch) { NavigationGrid grid = NavGrids[0]; grid.DrawDebug(camera, batch); }