From 8588ce841de7ab9095e70812edb60a31f4a85f71 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 4 Aug 2021 09:52:03 +0800 Subject: +animation curve --- Assets/Scripts/Unit/AnimationData.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Assets/Scripts/Unit') 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; -- cgit v1.1-26-g67d0