예제 #1
0
    public UshortDataLater Clone()
    {
        UshortDataLater clonedData = new UshortDataLater();

        clonedData.data = (ushort[, ])data.Clone();
        return(clonedData);
    }
예제 #2
0
 public DataLayer()
 {
     NoiseLayerData     = new IntDataLater();
     HeightLayerData    = new UshortDataLater();
     WaterLayerData     = new ByteDataLater();
     UnnaturalDataLayer = new ByteDataLater();
 }
예제 #3
0
    public UshortDataLater GenerateData(WorldDimensions worldDimensions, int areaDimensions, int x, int y)
    {
        UshortDataLater layer = new UshortDataLater();

        layer.data = new ushort[areaDimensions, areaDimensions];

        for (int i = 0; i < areaDimensions; i++)
        {
            for (int j = 0; j < areaDimensions; j++)
            {
                layer.data[i, j] = (ushort)UnityEngine.Random.Range(50, 52);
            }
        }

        return(layer);
    }