Ejemplo n.º 1
0
 public void initTrans()
 {
     try {
         string _tName = MRandom.RandLetter(10);
         initTrans(_tName);
     }catch (Exception) {
         initTrans();
     }
 }
Ejemplo n.º 2
0
    void Awake()
    {
        _meshFilter = GetComponent <MeshFilter>();
        _treeData   = new byte[Size][];
        for (int i = 0; i < Size; i++)
        {
            _treeData[i] = new byte[Size];
        }
        ClearPart();

        //Prepare random values for the color variations
        var colorRandom = new MRandom {
            seed = (uint)(MyX * MyY)
        };

        _colorNoise = new byte[Size, Size];
        for (var x = 0; x < Size; x++)
        {
            for (var y = 0; y < Size; y++)
            {
                _colorNoise[x, y] = (byte)colorRandom.getRand(x, y);
            }
        }
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     context = this;
 }