//获取动画事件
public void AddEvent()
{
GetComponent<SkeletonAnimation>().AddEventListener(TestEvent);
}
public void TestEvent(Spine.AnimationState state, int trackIndex, Spine.Event e)
{
if (e.ToString() == "fuckme")
{
Debug.Log("I'm in fucked");
}
public void AddEvent()
{
GetComponent<SkeletonAnimation>().AddEventListener(TestEvent);
}
public void TestEvent(Spine.AnimationState state, int trackIndex, Spine.Event e)
{
if (e.ToString() == "fuckme")
{
Debug.Log("I'm in fucked");
}
}
没啥好说的 直接上代码