summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Unit')
-rw-r--r--Assets/Scripts/Unit/AnimationData.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Assets/Scripts/Unit/AnimationData.cs b/Assets/Scripts/Unit/AnimationData.cs
index 9c880670..74f5eee1 100644
--- a/Assets/Scripts/Unit/AnimationData.cs
+++ b/Assets/Scripts/Unit/AnimationData.cs
@@ -24,6 +24,13 @@ public class AnimationData : ScriptableObject
// 对应的进度的播放速度,默认是1
public AnimationCurve curve;
+ public AnimationData()
+ {
+ Keyframe frame0 = new Keyframe(0, 1);
+ Keyframe frame1 = new Keyframe(1, 1);
+ curve = new AnimationCurve(frame0, frame1);
+ }
+
public int GetBoxesCount()
{
int hurt = hurtBoxes != null ? hurtBoxes.Count : 0;