【发布时间】:2013-01-12 13:46:40
【问题描述】:
cocos2d动画可以用ShoeBox吗? 只是我喜欢这个应用程序,它易于使用且免费。
就在我使用给我 plist 格式的 texturePacker 之前,而鞋盒给的 xml 看起来像
<TextureAtlas imagePath="sheet.png">
<SubTexture name="W1001.png" x="81" y="360" width="73" height="106"/>
<SubTexture name="W1002.png" x="83" y="130" width="76" height="106"/>
<SubTexture name="W1003.png" x="233" y="0" width="90" height="106"/>
<SubTexture name="W1004.png" x="0" y="136" width="81" height="106"/>
<SubTexture name="W1005.png" x="157" y="347" width="69" height="106"/>
<SubTexture name="W1006.png" x="0" y="360" width="78" height="105"/>
<SubTexture name="W1007.png" x="0" y="244" width="73" height="114"/>
<SubTexture name="W1008.png" x="401" y="0" width="75" height="117"/>
<SubTexture name="W1009.png" x="157" y="0" width="74" height="124"/>
<SubTexture name="W1010.png" x="81" y="0" width="74" height="127"/>
<SubTexture name="W1011.png" x="0" y="0" width="79" height="134"/>
<SubTexture name="W1012.png" x="325" y="0" width="74" height="122"/>
<SubTexture name="W1013.png" x="75" y="244" width="68" height="114"/>
<SubTexture name="W1014.png" x="161" y="126" width="77" height="105"/>
<SubTexture name="W1015.png" x="145" y="239" width="71" height="106"/>
<SubTexture name="W1016.png" x="228" y="233" width="68" height="106"/>
</TextureAtlas>
也就是说,cocos2d动画如何使用这个xml?
【问题讨论】:
-
写一个转换器。应该不难做到,cocos2d 纹理图集 plist 格式使用相同的参数(还有一些额外的参数,您可能可以忽略/设置为 0)。
-
是的.. 也许以后我会在 mac os 上做。目前我开始使用 Zwoptex。