summaryrefslogtreecommitdiff
path: root/Assets/ActionTool/Editor/ActionData.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-07-22 18:34:47 +0800
committerchai <chaifix@163.com>2021-07-22 18:34:47 +0800
commitcb893e1e5e4820cb800836cf6b8a79a1cd986cdc (patch)
treec96f8020c760d89d418684b71de294556d6961d3 /Assets/ActionTool/Editor/ActionData.cs
parentf7f2ebc0ce06aaf7d34325258c9bfe689043de94 (diff)
*misc
Diffstat (limited to 'Assets/ActionTool/Editor/ActionData.cs')
-rw-r--r--Assets/ActionTool/Editor/ActionData.cs9
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);
}