Example #1
0
    public MegaScatterLayer()
    {
        weight    = 100.0f;
        scale     = 1.0f;
        scaleLow  = new Vector3(1.0f, 1.0f, 1.0f);
        scaleHigh = new Vector3(1.0f, 1.0f, 1.0f);
        rotLow    = Vector3.zero;
        rotHigh   = Vector3.zero;
        distCrv   = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1));
        colvariations.Add(Color.white);

        MegaScatterCol scol = new MegaScatterCol();

        scattercols.Add(scol);
    }
Example #2
0
    public void Copy(MegaScatterLayer src)
    {
        LayerName      = src.LayerName;
        Enabled        = src.Enabled;
        obj            = src.obj;
        proxymesh      = src.proxymesh;
        weight         = src.weight;
        scale          = src.scale;
        uniformScaling = src.uniformScaling;
        uniscaleLow    = src.uniscaleLow;
        uniscaleHigh   = src.uniscaleHigh;

        prerot     = src.prerot;
        scaleLow   = src.scaleLow;
        scaleHigh  = src.scaleHigh;
        rotLow     = src.rotLow;
        rotHigh    = src.rotHigh;
        offsetLow  = src.offsetLow;
        offsetHigh = src.offsetHigh;
        snap       = src.snap;
        snapRot    = src.snapRot;
        distCrv    = src.distCrv;
        seed       = src.seed;

        noOverlap     = src.noOverlap;
        radius        = src.radius;
        colradiusadj  = src.colradiusadj;
        raycount      = src.raycount;
        align         = src.align;
        clearOverlap  = src.clearOverlap;
        markstatic    = src.markstatic;
        minDistance   = src.minDistance;
        maxDistance   = src.maxDistance;
        maxy          = src.maxy;
        miny          = src.miny;
        colAmt        = src.colAmt;
        colcurve      = src.colcurve;
        forcecount    = src.forcecount;
        maxcount      = src.maxcount;
        perCurveCount = src.perCurveCount;

        scaleOnDist     = src.scaleOnDist;
        vertexlimit     = src.vertexlimit;
        vertexnoise     = src.vertexnoise;
        noisescale      = src.noisescale;
        strength        = src.strength;
        showcolvari     = src.showcolvari;
        colorTexture    = src.colorTexture;
        minslope        = src.minslope;
        maxslope        = src.maxslope;
        collisionOffset = src.collisionOffset;
        useheight       = src.useheight;
        minheight       = src.minheight;
        maxheight       = src.maxheight;
        buildtangents   = src.buildtangents;
        buildcollider   = src.buildcollider;
        nocollider      = src.nocollider;
        disableCollider = src.disableCollider;

        alignobjs    = src.alignobjs;
        uniscalemode = src.uniscalemode;

        scattercols.Clear();
        for (int i = 0; i < src.scattercols.Count; i++)
        {
            MegaScatterCol col = new MegaScatterCol();
            col.lowcol  = src.scattercols[i].lowcol;
            col.highcol = src.scattercols[i].highcol;
            scattercols.Add(col);
        }

        colvariations.Clear();
        for (int i = 0; i < src.colvariations.Count; i++)
        {
            colvariations.Add(src.colvariations[i]);
        }
    }