diff options
author | chai <chaifix@163.com> | 2021-07-09 14:44:11 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-07-09 14:44:11 +0800 |
commit | f9bf87f60bd777cc5922e38133436eaa9fa45ba1 (patch) | |
tree | 374162d2f0c07a117a407ab201932e7d2ca5c622 /Assets/Scripts/Unit/AnimationData.cs | |
parent | a0577c8f3415b3173f8d57af631785b43c18d086 (diff) |
*misc
Diffstat (limited to 'Assets/Scripts/Unit/AnimationData.cs')
-rw-r--r-- | Assets/Scripts/Unit/AnimationData.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Assets/Scripts/Unit/AnimationData.cs b/Assets/Scripts/Unit/AnimationData.cs index 0091b798..4ee79cf9 100644 --- a/Assets/Scripts/Unit/AnimationData.cs +++ b/Assets/Scripts/Unit/AnimationData.cs @@ -6,9 +6,25 @@ using UnityEngine; [CreateAssetMenu(fileName = "Animation Data")]
public class AnimationData : ScriptableObject
{
- public string animationFile;
+ public string animationName;
+ public string animationPath;
public List<AnimationEventBase> animationEvents;
- public List<ColliderData> colliders;
+ public List<ColliderData> hurtBoxes;
+ public List<ColliderData> hitBoxes;
+ public List<ColliderData> throwBoxes;
+ public List<ColliderData> blockBoxes;
+ public List<ColliderData> defendBoxes;
+
+ public int GetBoxesCount()
+ {
+ int hurt = hurtBoxes != null ? hurtBoxes.Count : 0;
+ int hit = hitBoxes != null ? hitBoxes.Count : 0;
+ int thro = throwBoxes != null ? throwBoxes.Count : 0;
+ int block = blockBoxes != null ? blockBoxes.Count : 0;
+ int defend = defendBoxes != null ? defendBoxes.Count : 0;
+ return hurt + hit + thro + block + defend;
+ }
+
}
|