最简单的方法是修改skeleton.drawOrder
。这是对Slot的引用列表,你可以根据自己的喜好重新排序。
The easiest way is to change skeleton.drawOrder
. This is a list of references to the Slots which you can re-order as you like.
只要确保你没有设置了绘制顺序关键帧的动画,这样当动画播放时就会覆盖绘制顺序。
Just be sure that you don't have animations which have draw-order keyframes set, which would then overwrite the draw order when the animation is played.