diff options
author | chai <chaifix@163.com> | 2021-08-04 09:52:03 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-08-04 09:52:03 +0800 |
commit | 8588ce841de7ab9095e70812edb60a31f4a85f71 (patch) | |
tree | 96241a4794c24cc8f3728204e67d7227638110d0 /Assets/Scripts/Unit | |
parent | 494d3f727786ff70753692d8de019d9600a007e1 (diff) |
+animation curve
Diffstat (limited to 'Assets/Scripts/Unit')
-rw-r--r-- | Assets/Scripts/Unit/AnimationData.cs | 7 |
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;
|