Ejemplo n.º 1
0
    /*
     * Conglomerates all the methods required to generate a rope so that it is easy to call a simple method
     * from another object to generate the full rope.
     */
    protected void CreateVariedRope()
    {
        CreateRope rope = creationManager.GetComponent <CreateRope>();

        ReplaceParametersWithDMWidth(ref minStart.z, ref maxStart.z);
        rope.BuildRope(minStart, maxStart, minLength, maxLength, startPulleyMassOptions, endPulleyMassOptions, scenarioParent, rng);

        // Allows CreateRope to calculate these first, and then bring the values back here to use in CreatePulleyWheelSetup
        ropeAngle     = rope.RopeAngle;
        ropeDirection = rope.RopeDirection;
        length        = rope.Length;
        endPosition   = rope.EndPosition;
        startPosition = rope.StartPosition;
    }
Ejemplo n.º 2
0
 private void Start()
 {
     rope = FindObjectOfType <CreateRope>();
 }