summaryrefslogtreecommitdiff
path: root/_ActiveRagdoll/RigidbodyHolder.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2024-03-18 10:03:48 +0800
committerchai <215380520@qq.com>2024-03-18 10:03:48 +0800
commitc9fc4fbbe205ff69fa20ded822b2214847b59726 (patch)
treec9bcce93d3a887b0070aeeee5c1db80b7b112043 /_ActiveRagdoll/RigidbodyHolder.cs
parent793c4eae324d394f19a8bac66a803bf03a67ae9d (diff)
Diffstat (limited to '_ActiveRagdoll/RigidbodyHolder.cs')
-rw-r--r--_ActiveRagdoll/RigidbodyHolder.cs44
1 files changed, 0 insertions, 44 deletions
diff --git a/_ActiveRagdoll/RigidbodyHolder.cs b/_ActiveRagdoll/RigidbodyHolder.cs
deleted file mode 100644
index 796f77a..0000000
--- a/_ActiveRagdoll/RigidbodyHolder.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine;
-
-public class RigidbodyHolder : MonoBehaviour
-{
- private Rigidbody[] allRigs;
-
- private WeaponHandler weapons;
-
- private void Start()
- {
- allRigs = GetComponentsInChildren<Rigidbody>();
- weapons = GetComponent<WeaponHandler>();
- }
-
- private void Update()
- {
- }
-
- public Rigidbody[] GetAllRigs()
- {
- if (!weapons.leftGun && !weapons.rightGun)
- {
- return allRigs;
- }
- List<Rigidbody> list = new List<Rigidbody>();
- for (int i = 0; i < allRigs.Length; i++)
- {
- list.Add(allRigs[i]);
- }
- if ((bool)weapons)
- {
- if ((bool)weapons.leftGun)
- {
- list.Add(weapons.leftGun.rig);
- }
- if ((bool)weapons.rightGun)
- {
- list.Add(weapons.rightGun.rig);
- }
- }
- return list.ToArray();
- }
-}