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")