我相信我明白。 您想在同一骨骼上同时播放两个动画,并同时混合两个动画。
我研究了用于Spine的Cocos Creator JS API,它具有您要使用的setAnimation()和addAnimation()方法。
https://docs.cocos.com/creator/api/zh/classes/Skeleton.html
Cocos Creator还附带了一个Spine示例,看看:
https://github.com/cocos-creator/example-cases/blob/master/assets/cases/spine/SpineCtrl.js
它向您展示如何对动画进行排队,如何设置混合持续时间(从一种动画混合到另一种动画(例如从步行到跑步)所用的时间)。
这有帮助吗?
I believe I understand. You want to play two animations at the same time, on the same skeleton, and have both animations mix.
I looked into the Cocos Creator JS API for Spine, and it has the setAnimation()
and addAnimation()
methods you want to use.
https://docs.cocos.com/creator/api/zh/classes/Skeleton.html
Cocos Creator also comes with a Spine example, have a look:
https://github.com/cocos-creator/example-cases/blob/master/assets/cases/spine/SpineCtrl.js
It shows you how to queue animations, how to set mix durations (time used when blending from one animation to another, e.g. from walk to run).
Does this help?