- 见下文。
2.可以使用AnimationStateListener.complete()回调。 每次动画完成时都会调用它,包括循环动画。
- Spine 不直接提供此功能,但可以这样做:
TrackEntry entry = animationState.setAnimation (0, "Animation_1", true);
// 稍后,例如 在 AnimationStateListener.complete()
entry.loop = false;
animationState.addAnimation (0, "Animation_2", true, 0);
- See below.
- You can use the AnimationStateListener.complete() callback. It will be called everytime an animation completes, including looped animations.
- Spine doesn't offer this function directly, but it can be done like this:
TrackEntry entry = animationState.setAnimation(0, "Animation_1", true);
// Later, e.g. in AnimationStateListener.complete()
entry.loop = false;
animationState.addAnimation(0, "Animation_2", true, 0);