Commit 4ea6b276 authored by 范雪寒's avatar 范雪寒

fix: 加载龙骨动画的异步问题

parent 2cce1d42
{"ver":"1.1.2","uuid":"e9510d6a-8f9e-4795-8fe5-44102de390b3","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e9510d6a-8f9e-4795-8fe5-44102de390b3",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
......@@ -205,7 +205,7 @@ var game = cc.Class({
ske_json: OP26.data_mgr.data.ske_json,
tex_png: OP26.data_mgr.data.tex_png,
}
OP26.res_mgr.loadSpine(this.dragonLion, Info);
OP26.res_mgr.loadSpine(this.dragonLion, Info, ()=>{
//刚进入课件
//播放第一题题干
......@@ -220,6 +220,7 @@ var game = cc.Class({
this.resetUI();
//添加项
this.addItem();
});
},
//播放猫动画
......
......@@ -39,7 +39,7 @@ OP26.res_mgr = {
},
//加载龙骨
loadSpine(animationDisplay, Info) {
loadSpine(animationDisplay, Info, callback) {
cc.assetManager.loadAny([{ url: Info.tex_json, ext: '.txt' }, { url: Info.ske_json, ext: '.txt' }], (error, assets) => {
if (error) {
console.log(error)
......@@ -69,6 +69,8 @@ OP26.res_mgr = {
OP26.data_mgr.dragonName = data.animation[0].name;
animationDisplay.node.active = true;
callback && callback();
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment