1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
using UnityEngine; public class RagdollHandler : MonoBehaviour { public float ragdollValue = 1f;//1 private RigidbodyHolder rigs;//14 private void Start() { rigs = GetComponent<RigidbodyHolder>(); } private void Update() { for (int i = 0; i < rigs.GetAllRigs().Length; i++) { rigs.GetAllRigs()[i].GetComponent<DragHandler>().dragAmount = ragdollValue; } } }