summaryrefslogtreecommitdiff
path: root/RagdollHandler.cs
blob: ca52b8d6a57b593e0bc4b7f1328f2815adccc125 (plain)
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;

	private RigidbodyHolder rigs;

	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;
		}
	}
}