cc.loader.onProgress=(completedCount,totalCount,item)=>{
var perent=Math.abs(Math.floor((completedCount/totalCount).toFixed(2)100)/100);
this.bar_pro.progress=perent;
this.perent_lable.string=Math.floor(perent100)+’%’;
this.load_fillRange_sprite.fillRange=parseFloat(perent);
this.lightSpotNode.x=-700+Math.abs(this.load_fillRange_sprite.fillRange)*1400;
}
cc.director.preloadScene(game_name_n,()=>{
cc.loader.onProgress=function(){};
cc.director.loadScene(game_name_n);
},);
到百分之百的时候跳转场景在手机上会卡4到5秒,这有点不正常啊
这个方法好像在手机上不起作用,ios和安卓都是
遇到同样的问题,尚未来得及研究,求解答
求官方
顶上去
顶上去
同求解决方法
http://forum.cocos.com/t/prefab-1-7/54122
如果是prefab预制很多的场景, cc.instantiate很多的话,参考上面那个改下,还有我们之前在游戏一开始的时候就加载了游戏场景用的所有prefab及大的合图之后,优化速度比较明显
1赞
您好,请问兄弟,这个问题解决了吗,我现在也遇到同样的问题,