如题,
我尝试使用
`
properties: {
m_List:[cc.SpriteFrame]
},
start:function(){
window.SpriteFra = {};
SpriteFra.Sprites = null;
var url = ‘https://profile.csdnimg.cn/5/D/7/1_magic_code_’;
var self = this;
cc.loader.load(url,cc.SpriteFrame, function (err, t) {
let _sprite = new cc.SpriteFrame(t);
self.m_List = _sprite;
cc.log(self.m_List);
},this);
cc.log(this.m_List + ‘/////////////////////////’);
this.node.getComponent(cc.Sprite).spriteFrame = this.m_List;
}`
这段代码无法加载Sprite,但是如果把node.getCompon…放在load里面就可以进行读取,self.m_List同上,也是无效,请问各位大佬,我切换数据难道要每帧都去load?