/* * 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; }
private void Start() { rope = FindObjectOfType <CreateRope>(); }