Esempio n. 1
0
 void OnEnable()
 {
     if (!GridMetrics.noiseSource)
     {
         GridMetrics.noiseSource = noiseSource;
         GridMetrics.InitializeHashGrid(seed);
         GridMetrics.colors = colors;
     }
 }
Esempio n. 2
0
    void Awake()
    {
        GridMetrics.noiseSource = noiseSource;
        GridMetrics.InitializeHashGrid(seed);
        GridMetrics.colors = colors;

        cellCountX = chunkCountX * GridMetrics.chunkSizeX;
        cellCountZ = chunkCountZ * GridMetrics.chunkSizeZ;

        CreateChunks();
        CreateCells();
    }
Esempio n. 3
0
    private void Awake()
    {
        gridMaterials = GameObject.Find("EditorCanvas").GetComponent <MapEditor>().materials;
        cellCountX    = chunkCountX * GridMetrics.chunkSizeX;
        cellCountZ    = chunkCountZ * GridMetrics.chunkSizeZ;
        GridMetrics.InitializeHashGrid(seed);
        chunkCuller = new CullingGroup();
        chunkCuller.SetBoundingDistances(new float[] { distanceBand1, distanceBand2, distanceBand3 });
        chunkCuller.onStateChanged = StateChangedMethod;

        CreateChunks();
        CreateCells();
    }
Esempio n. 4
0
 void OnEnable()
 {
     GridMetrics.InitializeHashGrid(seed);
 }