请问下,我把Cocos Studio 1.5 导出的动画放到 js 新建项目的rec 文件夹下,
然后在resource.js 里
var res = {
HelloWorld_png : “res/HelloWorld.png”,
CloseNormal_png : “res/CloseNormal.png”,
CloseSelected_png : “res/CloseSelected.png”,
herojson:"res/Hero/Hero.ExportJson",
c2:"res/Hero/blood.plist",
c4:"res/Hero/Hero0.plist",
c5:"res/Hero/Hero0.png"
};
var g_resources = ];
for (var i in res) {
g_resources.push(res*);
}
再 app.js 里面 加上
ccs.armatureDataManager.addArmatureFileInfo(res.herojson);
var armature = new ccs.Armature(“Hero”);
armature.getAnimation().play(“run”);
armature.setScale(0.5);
this.addChild(armature, 0, 0);
为什么调试却报错 JS: F:/android/ccwork/newgame3/runtime/win32/…/…/src/app.js:50:TypeError: armature.getAnimation(…) is null
哪位大神能帮忙解答下,谢谢*
