public void Start() { var grid = new WorldGrid(); GridUpdate.ResetGraph(); Placer = new BuildingWorldPlacement(grid, m_PlaceableObjectChecker); World = this; }
/// <summary> Constructor. </summary> /// <param name="world"> The world from which tiles should be loaded. </param> /// <param name="halfWidth"> How far from the center tile that the flow should analyze. Double /// this value to get the width (or height) of the box that this object analyzes. </param> public GridTargetFlow(WorldGrid world, int halfWidth) { _world = world; _halfWidth = halfWidth; // + 1 because we want an odd number so that our "target" is directly in the middle of our grid _cachedView = new Array2D <CellData>(halfWidth * 2 + 1, halfWidth * 2 + 1); _data = new Array2D <FlowData>(_cachedView.Width, _cachedView.Width); _reanalyzeQueue = new Queue <GridCoordinate>(); }