summaryrefslogtreecommitdiff
path: root/FrogTest/Assets/Scripts/Body.cs
diff options
context:
space:
mode:
Diffstat (limited to 'FrogTest/Assets/Scripts/Body.cs')
-rw-r--r--FrogTest/Assets/Scripts/Body.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/FrogTest/Assets/Scripts/Body.cs b/FrogTest/Assets/Scripts/Body.cs
new file mode 100644
index 0000000..ecf1933
--- /dev/null
+++ b/FrogTest/Assets/Scripts/Body.cs
@@ -0,0 +1,27 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Body : MonoBehaviour
+{
+
+ public List<BodyPart> parts;
+
+ private void Awake()
+ {
+ parts = new List<BodyPart>();
+ parts.AddRange(gameObject.GetComponentsInChildren<BodyPart>());
+ }
+
+ void Start()
+ {
+
+ }
+
+ private void Reset()
+ {
+ parts = new List<BodyPart>();
+ parts.AddRange(gameObject.GetComponentsInChildren<BodyPart>());
+ }
+
+}