public void ApplySolutionToMap(Grid3di map, int code) { foreach (Vec3di step in curPath) { map.SetAt(step.x, step.y, step.z, code); } }
public void ApplyMap(Grid3di m, int z) { for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { Tile t = tiles[y * width + x]; t.code = m.GetAt(x, y, z, m.BorderCode); } } }
protected virtual void OnStart() { srcGrid = new Grid3di(); srcGrid.Resize(mapWidth, mapHeight, mapDepth); srcGrid.BorderCode = 99; resGrid = new Grid3di(mapWidth, mapHeight, mapDepth); agent.map = srcGrid; agent.ownPosition = pathStart; pathNeedsUpdate = true; }