void Start() { //Start singleton managers WorldGeneration instance = WorldGeneration.Instance; Region.setWorld(this); regions = new Dictionary <string, Region> (); // for (int x = 0; x < initialRegions; x++) { // for (int y =0; y < initialRegions; y++) { // for (int z = 0; z < initialRegions; z++) { // createRegion (x, y, z, false); // } // } // } //Region centerRegion = getRegionAtIndex (1, 0, 1); Region centerRegion = createRegion(0, 0, 0, false); loadAllNeighbors(centerRegion, false); //Initialize Chunk Manager GameObject chunkManagerGO = GameObject.Find("Chunk Manager") as GameObject; ChunkManager manager = chunkManagerGO.GetComponent <ChunkManager> (); manager.createChunkPool(); clientRenderer = gameObject.GetComponent("VoxelModifyTerrain") as VoxelModifyTerrain; clientRenderer.setStartRegion(centerRegion); InvokeRepeating("SaveToDiskEvent", 30f, 30f); }
public void Start() { GameObject terrainGO = GameObject.FindGameObjectWithTag("ground"); terrain = terrainGO.GetComponent("VoxelModifyTerrain") as VoxelModifyTerrain; //effectFactory = new EffectFactory (); //effectFactory.height = this.height; }