From 754ceacd8ab62e7094f1827ae45ea16a502725ad Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 6 Aug 2021 19:02:03 +0800 Subject: *curve --- Assets/ActionTool/Editor/ActionData.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Assets/ActionTool/Editor/ActionData.cs') diff --git a/Assets/ActionTool/Editor/ActionData.cs b/Assets/ActionTool/Editor/ActionData.cs index 6993b378..600eccc5 100644 --- a/Assets/ActionTool/Editor/ActionData.cs +++ b/Assets/ActionTool/Editor/ActionData.cs @@ -20,7 +20,7 @@ namespace ActionTool private AnimationEventBase m_CurEventInfo; // 当前正在编辑的event - private UnitTimeline m_Timeline; + private TimelineEventProxy m_TimelineEventProxy; #region metadata private float m_TotalFrame; //timeline采样的总帧数 @@ -82,7 +82,7 @@ namespace ActionTool m_PrevLocalTime = 0; m_Animator.Play(kStateName, 0, 0); m_RootMotion = rootmotion; - m_Timeline = m_Animator.gameObject.GetOrAddComponent(); + m_TimelineEventProxy = new TimelineEventProxy(animator.gameObject.transform); } public void SetCurrentAnimTime(float time) @@ -161,7 +161,7 @@ namespace ActionTool AnimationData animData = ActionManager.animationData; if (animData) { - AnimationCurve curve = animData.curve; + AnimationCurve curve = animData.speedCurve; deltaFrame *= curve.Evaluate(normalizeTime); } } @@ -220,11 +220,11 @@ namespace ActionTool public void RunEvent() { - if (m_Timeline != null) - m_Timeline.ExecuteAnimationEvents(ActionManager.animationData, m_CurAnimFrame); + if (m_TimelineEventProxy != null) + m_TimelineEventProxy.ExecuteAnimationEvents(ActionManager.animationData, m_CurAnimFrame); } - public void CreateEvent(UnitTimeline.EEventType eventtype, int startFrame) + public void CreateEvent(TimelineEventProxy.EEventType eventtype, int startFrame) { var classes = Assembly .GetAssembly(typeof(AnimationEventBase)) -- cgit v1.1-26-g67d0