美文网首页
Unity Spine动画常规使用

Unity Spine动画常规使用

作者: betterplace | 来源:发表于2020-06-25 01:11 被阅读0次

Spine动画改颜色 

m_skeletonAnimiation.skeleton.SetColor(new Color(1, 1, 1, 0));

Spine动画即时倒播 //需要动画做正反2个同步循环动画,切换 动画实现 

float time2 = skeletonAnimation.state.GetCurrent(0).AnimationTime;

skeletonAnimation.state.SetAnimation(0, "back", true).TrackTime = alltime- time2;

Spine动画事件

skeletonAnimation.state.Event += State_Event;

 private void State_Event(Spine.TrackEntry trackEntry, Spine.Event e)

 {

    if (e.Data.Name == "throw")

  {

 //DoSomeThing

 }

}

获取动画时间

   float time = m_skeletonAnimation.state.SetAnimation(0, "run", false).Animation.Duration;

//修改皮肤

// skeletonAnimation.initialSkinName = "2";

//skeletonAnimation.Initialize(true);

相关文章

网友评论

      本文标题:Unity Spine动画常规使用

      本文链接:https://www.haomeiwen.com/subject/vhejfktx.html