Ejemplo n.º 1
0
    private void SimulateBurst()
    {
        IRopeSimulate ropeSimulation = new IRopeSimulate
        {
            fixedDeltaTime = Time.fixedDeltaTime,
            segments       = ropeSegments,
            pos            = (Vector2)transform.position
        };
        JobHandle      x             = ropeSimulation.Schedule(ropeSegments.Length, 16);
        IConstraintJob constraintSim = new IConstraintJob
        {
            segments      = ropeSegments,
            pos           = (Vector2)transform.position,
            pos2          = (Vector2)target.transform.position,
            useTarget     = this.useTarget,
            segmentLength = this.segmentLength
        };

        constraintSim.Schedule(x).Complete();
    }
Ejemplo n.º 2
0
    public JobHandle SimulateBurst()
    {
        IRopeSimulate ropeSimulation = new IRopeSimulate
        {
            fixedDeltaTime = Time.fixedDeltaTime,
            segments       = ropeSegments,
            pos            = transform.position
        };
        JobHandle      x             = ropeSimulation.Schedule(ropeSegments.Length, 16);
        IConstraintJob constraintSim = new IConstraintJob
        {
            segments      = ropeSegments,
            pos           = transform.position,
            pos2          = target.transform.position,
            useTarget     = this.useTarget,
            segmentLength = this.segmentLength
        };

        return(constraintSim.Schedule(x));
    }