コード例 #1
0
    public override void OnBirthed()
    {
        float[] values = new float[particles.count * particles.structSize];
        particles.SetData(values);

        values = new float[body.verts.count * body.verts.structSize];
        body.verts.SetData(values);

        closest.Set(particles);
    }
コード例 #2
0
    public override void Bind()
    {
        simulate.BindInt("_Frame", () => frame);
        simulate.BindPrimaryForm("_VertBuffer", verts);
        simulate.BindForm("_ConnectionBuffer", connections);

        resolve.BindPrimaryForm("_VertBuffer", verts);
        resolve.BindForm("_ConnectionBuffer", connections);


        closest.Set(verts);
    }
コード例 #3
0
    public override void Bind()
    {
        set.BindPrimaryForm("_VertBuffer", particles);

        set.BindInt("_Size", () => size);

        set.BindVector3("_TopLeft", () => this.topLeft);
        set.BindVector3("_TopRight", () => this.topRight);
        set.BindVector3("_BottomLeft", () => this.bottomLeft);
        set.BindVector3("_BottomRight", () => this.bottomRight);


        simulate.BindPrimaryForm("_VertBuffer", particles);
        simulate.BindInt("_Locked", () => locked);
        simulate.BindFloat("_DeathTime", () => deathTime);
        simulate.BindFloat("_Distance", () => distance);
        simulate.BindFloat("_CanEdgeSwipe", () => data.inputEvents.canEdgeSwipe);
        simulate.BindInt("_ClosestID", () => (int)checkClosest.closestID);


        data.BindAllData(simulate);
        data.BindAllData(transfer.transfer);

        transfer.transfer.BindInt("_NumVerts", () => this.size);
        transfer.transfer.BindInt("_NumSmoothedVerts", () => this.smoothedSize);

        transfer.transfer.BindFloat("_DeathTime", () => deathTime);
        transfer.transfer.BindInt("_Locked", () => locked);
        transfer.transfer.BindFloat("_Distance", () => distance);
        transfer.transfer.BindFloat("_CanEdgeSwipe", () => data.inputEvents.canEdgeSwipe);

        transfer.transfer.BindFloat("_Fade", () => currentPage.fade);



        corners.transfer.BindFloat("_Distance", () => distance);
        corners.transfer.BindFloat("_Fade", () => currentPage.fade);

        corners.transfer.BindInt("_Locked", () => locked);
        corners.transfer.BindFloat("_DeathTime", () => deathTime);



        checkClosest.Set(particles);
        data.BindAllData(checkClosest);
    }
コード例 #4
0
 public void BindNewForm(Form f)
 {
     ToBind = f;
     life.Set(f);
 }