var url = {
atlasUrl: "http://47.96.2.87:8080/rw.plist", // 图集plist文件地址
atlasTextureUrl: "http://47.96.2.87:8081/rw.png", // 图集纹理图片地址
};
cc.assetManager.loadRemote(url.atlasUrl, function(err, atlas) {
cc.loader.load({url: url.atlasTextureUrl, type: 'png'}, function(err, texture) {
atlas.texture = texture;
var spriteFrame = atlas.getFrame('1(1)');
ent1.getComponent(cc.Sprite).spriteFrame = spriteFrame;
});
});
两问题 第一 出错提示 TypeError: atlas.getFrame is not a function
第二怎么把这 服务器两个端口8081 和8080写到一个端口