如果您的意思是 Spineboy 显示两个不同的骨架,这是由于 Spineboy 的不同(separte)皮肤设置。 您的代码修改了 SkeletonData
的皮肤,这并不好,因为它为所有实例修改了该皮肤。 Spineboy 有两种皮肤(如果我没记错的话),这就是右边第二个 Spineboy 看起来不同的原因。 修改共享 SkeletonData
皮肤附件的代码仍然是错误的,因此请务必不要使用它(除非您想为所有实例修改它)。
If you mean that Spineboy shows two different skeletons, this is due to different (separte) Skin setup at Spineboy. Your code modifies a skin of SkeletonData
, which is not good since it modifies this skin for all instances. Spineboy has two skins (if I remember correctly), which is the reason why the second Spineboy to the right looks different. The code to modify attachments of a shared SkeletonData's skin is still wrong, so please be sure not to use it (unless you want to modify it for all instances).