Пример #1
0
    public void CheckVerticalCombine(PathfindingGrid grid)
    {
        PathfindingNode test = grid.CellAt(TopProbePos());

        while (test != null && test.area.width == area.width)
        {
            test.ReplaceWith(this, grid);
            area.height += test.area.height;

            test = grid.CellAt(TopProbePos());
        }
    }
Пример #2
0
    public void CheckHorizontalCombine(PathfindingGrid grid)
    {
        PathfindingNode test = grid.CellAt(LeftProbePos());

        while (test != null && test.area.height == area.height)
        {
            test.ReplaceWith(this, grid);
            area.width += test.area.width;

            test = grid.CellAt(LeftProbePos());
        }
    }