void GenerateMap() { map = new int[width, height, depth]; RandomFillMap(); CubeBoxGenerator cubeBoxGen = GetComponent <CubeBoxGenerator>(); cubeBoxGen.GenerateCubeBox(map); }
private IEnumerator UpdateMap() { while (true) { for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { for (int z = 0; z < depth; z++) { map[x, y, z] = lifeEngine.CalcCellInLukesBox(x, y, z); } } } yield return(new WaitForSeconds(updateTime)); CubeBoxGenerator cubeBoxGen = GetComponent <CubeBoxGenerator>(); cubeBoxGen.GenerateCubeBox(map); } }