骨骼动画
2015-10-09 15:00
246 查看
local manager = ccs.ArmatureDataManager:getInstance()
--manager:removeArmatureFileInfo("bear.ExportJson")
manager:addArmatureFileInfo("NewAnimation/NewAnimation.ExportJson")
print(manager)
local armature = ccs.Armature:create("NewAnimation")
print(armature)
armature:getAnimation():playWithIndex(0)
armature:getAnimation():setSpeedScale(1.2)
armature:setPosition(cc.p(display.cx, display.cy))
self:addChild(armature)
--添加plist骨骼动画
local plist = cc.ParticleSystemQuad:create("SmallSun.plist")
print(plist)
local bone = ccs.Bone:create("plist")
print(bone)
bone:addDisplay(plist, 0) --添加表现形式
bone:changeDisplayWithIndex(0,true) --切换变现形式
bone:setIgnoreMovementBoneData(true) --新增bone没有这个会被隐藏
bone:setLocalZOrder(100)
bone:setScale(0.5)
armature:addBone(bone, "zuo")
--manager:removeArmatureFileInfo("bear.ExportJson")
manager:addArmatureFileInfo("NewAnimation/NewAnimation.ExportJson")
print(manager)
local armature = ccs.Armature:create("NewAnimation")
print(armature)
armature:getAnimation():playWithIndex(0)
armature:getAnimation():setSpeedScale(1.2)
armature:setPosition(cc.p(display.cx, display.cy))
self:addChild(armature)
--添加plist骨骼动画
local plist = cc.ParticleSystemQuad:create("SmallSun.plist")
print(plist)
local bone = ccs.Bone:create("plist")
print(bone)
bone:addDisplay(plist, 0) --添加表现形式
bone:changeDisplayWithIndex(0,true) --切换变现形式
bone:setIgnoreMovementBoneData(true) --新增bone没有这个会被隐藏
bone:setLocalZOrder(100)
bone:setScale(0.5)
armature:addBone(bone, "zuo")
相关文章推荐
- ANDROID内存优化(大汇总——全)
- REL5 安装中文包
- Android Studio SVN
- Android 学习之Activity与Fragment之间的信息传递
- 【扣丁学堂】“野生”程序员
- 【第十四篇】easyui datagrid导出excel
- Python 简单网页爬虫学习
- web项目添加mavean功能
- Oracle Scott创建视图权限不足解决办法
- Android实用方法 — 常用的方法、知识(一)
- UVA - 699 The Falling Leaves
- MySQL修改root密码的多种方法
- 二叉树的三种遍历方式
- oracle冷备份
- JavaBean的定义和原理及bean的动作元素
- Scala学习笔记12【继承、抽象类、trait实战】
- ZenNodeDiscovery
- CAS环境下的AJAX跨域
- iOS经典讲解之实现App消息推送功能(二)
- Android性能专项测试之Network monitor