cocos2d-x 3.2 lua 怎么导入cocostudio动画

2025-04-15 16:14:58
推荐回答(1个)
回答1:

function MyGameScene:createAnimation()
ccs.ArmatureDataManager:getInstance():addArmatureFileInfo("img/role0.png","role0.plist","img/role.ExportJson")
local animation = ccs.Armature:create("role")
animation:setPosition(self.windowsSize.width/2,self.windowsSize.height/2)
animation:getAnimation():play("attack")
return animation
end

local animation = ccs.Armature:create("role")