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

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

        CreateChunks();
        CreateCells();
    }
Exemple #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();
    }
Exemple #4
0
 void OnEnable()
 {
     GridMetrics.InitializeHashGrid(seed);
 }