loading:function(){
this._isLoading = true;
cc.loader.onProgress = function ( completedCount, totalCount, item ){
loadingSelf._progress = completedCount/totalCount;
};
cc.loader.loadResDir("resources", function (err, assets) {
loadingSelf.onLoadComplete();
});
},
onLoadComplete:function(){
if(!hasloadScene&&!loadingSelf.outTime){
cc.director.loadScene(sceneIndex);
hasloadScene = true;
}
},
这是切换场景读条的两段代码
另外有一个schedule
upDateCount:function(){
this.count++;
if(this.count>30){
this.outTime = true;
if(_gameWsk){
_gameWsk.close();
}
var fun = function(){
cc.director.loadScene(“loginscene”);
};
cc.xx.TipsManager.openClickTips_one(loadingSelf.tips,“加载资源超时,检查网络连接”,fun);
}
},
如果超过30秒 就弹出提示框 点击确定 返回登录场景 可是点击确定后会报错
1208 scene already loaing 什么的…
正确的做法是什么呢