Regen() private method

private Regen ( ) : void
return void
Esempio n. 1
0
 private void Update()
 {
     for (int i = 0; i < amount; i++)
     {
         Transform g = root.transform.GetChild(i);
         //g.transform.localScale = Vector3.one * .1f * Random.Range(.4f, 1f);
         //g.transform.localPosition = Random.insideUnitSphere * .4f;
         //g.transform.parent = root.transform;
         blob.inBlobs[i] = g.transform;
     }
     blob.Regen();
 }
 public override void MakeArt()
 {
     blob         = GetComponent <MCBlob>();
     blob.dimX    = blob.dimY = blob.dimZ = resolution;
     blob.inBlobs = new Transform[amount];
     for (int i = 0; i < amount; i++)
     {
         GameObject g = new GameObject();
         g.transform.localScale    = Vector3.one * .1f * Random.Range(.4f, 1f);
         g.transform.localPosition = Random.insideUnitSphere * .4f;
         g.transform.parent        = root.transform;
         blob.inBlobs[i]           = g.transform;
     }
     blob.Regen();
 }