public MeshGenerationJob(Chunk chunk, DensityProvider provider, Vector3 offset, Action<MeshProxy> callback) { this.provider = provider; this.offset = offset; this.callback = callback; this.chunk = chunk; }
public static Chunk createWithProvider(DensityProvider densityProvider, Material mat, Vector3 position) { GameObject chunk = (GameObject) new GameObject (); chunk.name = "chunk"; chunk.transform.position = position; Chunk chunkComponent = chunk.AddComponent<Chunk> (); chunkComponent.densityProvider = densityProvider; chunkComponent.mat = mat; return chunkComponent; }
void ConfigureProvider() { provider = new DensityProvider (); provider.AddLayer (new CaveLayer ()); }