微信小游戏:加载微信图片
2018-09-18 本文已影响84人
cmd_ts
load_picture_async(imgurl,temp){
return new Promise((resolve,reject) => {
var self = this;
cc.loader.load(imgurl, function(err, texture){
self.node.getChildByName('image').getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture);
resolve('ok')
});
})
}
批量加载微信图片
