![](http://www.cocoachina.com/bbs/attachment/201209/15/225050fz251fd1741xz525.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225054k6zk772spzfky7y7.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225057nqg0uqbvz1b1yxvd.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225100fdzjzkvs6qvjv6kj.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225102gngqgq91nli8nqhu.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225105diige3eaj4bapsjm.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225107fv4htihghq0mc0aa.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225110vjomvd2djqqo00ee.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/22511339967p97t21l29z3.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225115twgzp6tznlnyk99t.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/2251194ost9t48778oongz.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225121hc9xbq9xd8zbcmcz.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/22512389849fsski0kbut9.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/2251257nelqtn78f2sz0e2.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225128o1stihjaia9hktkd.jpg)
![](http://www.cocoachina.com/bbs/attachment/201209/15/225132ujufqkchwkwvjjwq.jpg)
不全是和原版一样,我做了一定的修改来更方便的生成数据。
blog: rainynote.com
使用说明:1.安装 SkeletonSWFPanel.zxp ![]()
2.如果安装不成功,可以手动拷贝文件 1.3\SkeletonSWFPanel\SkeletonSWFPanel\bin-debug 里的 SkeletonSWFPanel.swf 和
SkeletonSWFPanel 文件夹到
C:\Users\youyou\AppData\Local\Adobe\Flash CS6\zh_CN\Configuration\WindowSWF\SkeletonSWFPanel 这是WIN7下的做法,其他系统不大清楚。
![]()
3.打开Flash cs6 -> 窗口 ->其他面板 -> SkeletonSWFPanel
![]()
4. import-> 选择一个 你想要的 导入方式 导入 动画.
![]() ![]()
tween time : 两个动作切换 需要花的时间,比如 由 stand 切换到 run 中间的 tween 时间
animation time : 这个动作持续的时间
stage frameRate : 指的是 游戏 的帧率,因为可能不同的朋友 需要不同帧率的游戏,在这里设定了帧率再去调animation time后,你在游戏中 以同样的帧率来运行游戏,就能看到和在工具上显示的 动画效果 是一样的。(这个设定 是为了方便你调射动画速度,因为 Flash中默认是 24 帧 )
bone animation delay : 这是一个很有用的设定,操作时 选中
中的一个元素后 再调这个值,效果,举例说 如果只有 做了两帧动画,如果只播放这两帧动画,则会出现 所有 的 bone 的 动作的速率是一样的 , ![]()
像
图中所示 上面的马 的腿 的动作 是一样的,下面的马腿 设定了 延时 动作,这样出现一前一后跑动的效果,比较真实,不会死板。 ![]()
5. 1.0的 骨骼从属需要手动 设置 很是繁琐,现在只要 在 bone 框内就可以拖动从属关系。
6.export :这里提供了三种 保存方式, png swf 单个文件 ,单个文件主要是方便我们自己可以选择打包方式,png 方式 会把 xml信息也压缩进 png里。
程序里面需要做的就是:
// step 1: add your skeleton xml file //CCConnectionData::sharedConnectionData()->addData("knight.xml"); CCConnectionData::sharedConnectionData()->addData("zombie.xml"); // step2: add plist and png to cache CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("zombie.plist", "zombie.png"); // step 3: create a CCSpriteBatchNode //CCSpriteBatchNode *batchNode = CCSpriteBatchNode::create("knight.png"); CCSpriteBatchNode *batchNode = CCSpriteBatchNode::create( "zombie.png" ); // step 4: create a armature just need armature name, plist, picture, and a CCSpriteBatchNode // armature = CCArmature::cr eate("Knight_f/Knight", "Knight_f/Knight", "knight.plist", "knight.png", batchNode); armature = CCArmature::create("Zombie_f/Zombie", "Zombie_f/Zombie", batchNode); armature->getDisplay()->setPosition(ccp(size.width/2, size.height/2)); armature->getDisplay()->setScale( 1 ); // step 5: play the animation armature->getAnimation()->playTo("stand"); |