-
Creator 版本:2.0.8
-
目标平台:
-
详细报错信息,包含调用堆栈:
-
重现方式:必现
-
之前哪个版本是正常的 :
-
手机型号 :
-
手机浏览器 :
-
编辑器操作系统 :
-
编辑器之前是否有其它报错 :
-
出现概率:100%
-
额外线索:
for (let i = 0; i < heng; i++) {
for (let j = 0; j < shu; j++) {
this.fruitImgsamll(
“Texture/xxxxx”,
imgx + cellheight * (j), imgy + cellheight * (i),
cellheight * (j), cellheight * (i),
cellheight, cellheight)
}
}private fruitImgsamll(ziyuan, nodex, nodey, x, y, w, h) {
const self = this;
cc.loader.loadRes(ziyuan, cc.SpriteFrame, function (err, sp) {
console.log(x, y)
sp.setRect(cc.rect(x, y, w, h));
const nn = new cc.Node(‘sprite’);
nn.addComponent(cc.Sprite).spriteFrame = sp;
nn.setPosition(nodex, nodey);
nn.parent = self.node;
});}