From f9bf87f60bd777cc5922e38133436eaa9fa45ba1 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 9 Jul 2021 14:44:11 +0800 Subject: *misc --- Assets/Scripts/Unit/AnimationData.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'Assets/Scripts/Unit/AnimationData.cs') 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 animationEvents; - public List colliders; + public List hurtBoxes; + public List hitBoxes; + public List throwBoxes; + public List blockBoxes; + public List 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; + } + } -- cgit v1.1-26-g67d0