diff options
Diffstat (limited to 'Assets/ActionTool/Editor/ActionData.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionData.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Assets/ActionTool/Editor/ActionData.cs b/Assets/ActionTool/Editor/ActionData.cs index c00dd269..77935f68 100644 --- a/Assets/ActionTool/Editor/ActionData.cs +++ b/Assets/ActionTool/Editor/ActionData.cs @@ -20,6 +20,8 @@ namespace ActionTool private AnimationEventBase m_CurEventInfo; // 当前正在编辑的event
+ private TimelineEvent m_Timeline;
+
#region metadata
private float m_TotalFrame; //timeline采样的总帧数
public float totalFrame { get { return m_TotalFrame; } }
@@ -64,6 +66,7 @@ namespace ActionTool m_PrevLocalTime = 0;
m_Animator.Play(kStateName, 0, 0);
m_RootMotion = rootmotion;
+ m_Timeline = m_Animator.gameObject.GetComponent<TimelineEvent>();
}
public void SetCurrentAnimTime(float time)
@@ -180,7 +183,9 @@ namespace ActionTool }
public void RunEvent()
- {
+ {
+ if (m_Timeline != null)
+ m_Timeline.ExecuteAnimationEvents(ActionManager.animationData, m_CurAnimFrame);
}
public void CreateEvent(TimelineEvent.EEventType eventtype, int startFrame)
@@ -202,7 +207,7 @@ namespace ActionTool if(type != null)
{
var e = Activator.CreateInstance(type) as AnimationEventBase;
- e.type = eventtype;
+ //e.type = eventtype;
e.startFrame = startFrame;
AddEvent(e);
}
|