/// <summary> /// Instantiates a muscle at the specified point. /// </summary> private void CreateMuscleFromBone(Bone bone) { var muscleData = new MuscleData(idCounter++, bone.BoneData.id, bone.BoneData.id, Muscle.Defaults.MaxForce, true); currentMuscle = Muscle.CreateFromData(muscleData); currentMuscle.startingBone = bone; currentMuscle.SetLinePoints(bone.Center, bone.Center); }
private Muscle CreateMuscleBetween(Bone startingBone, Bone endingBone, MuscleData data) { var muscle = Muscle.CreateFromData(data); muscle.startingBone = startingBone; muscle.endingBone = endingBone; muscle.SetLinePoints(startingBone.Center, endingBone.Center); return(muscle); }