Пример #1
0
    public void Scatter()
    {
        if ( obj && surfaceLoft && surfaceLayer >= 0 )
        {
            Random.seed = seed;

            if ( remove )
            {
                Remove();
            }

            for ( int i = 0; i < count; i++ )
            {
                MegaLoftObj lobj = new MegaLoftObj();

                lobj.obj = (GameObject)GameObject.Instantiate(obj);

                lobj.obj.name = obj.name + " " + nametouse + " " + i;

                lobj.obj.transform.parent = parent;

                lobj.alpha = Random.Range(start, end);
                lobj.calpha = Random.Range(crosslow, crosshigh);

                lobj.scl = Random.Range(scalelow, scalehigh);

                lobj.rot = Random.Range(rotlow, rothigh);

                Position(lobj);	//cow, alpha, crossalpha, rot, scl);
                objects.Add(lobj);
            }
        }
    }
Пример #2
0
 public void Position(MegaLoftObj lo)
 {
     Position(lo.obj, lo.alpha, lo.calpha, lo.rot, lo.scl);
 }