微信小游戏打包多个图集有些图集无法渲染,有部分可以渲染。但在浏览器中都可以渲染。
cc.resources.loadDir("", cc.SpriteAtlas, function (err, atlas) {
console.log(“atlas”)
console.log(atlas)
atlas.map((item, index) => {
if (item.name == ‘baseImg.plist’) {
GameTools.love2048FrameCache = atlas[index];
} else if (item.name == ‘testImg-2.plist’) {
GameTools.testImg1 = atlas[index];
} else if (item.name == ‘testImg-3.plist’) {
GameTools.testImg2 = atlas[index];
} else if (item.name == ‘testImg-5.plist’) {
GameTools.testImg3 = atlas[index];
}
})
});