使用
Laya.timer.frameLoop();函数
看了官方API,第四个参数是传一个数组,作为回调函数的入参,
[code] var spriteArray = new Array();
spriteArray.push(warehouse1);
Laya.timer.frameLoop(1, this, freshBubble,spriteArray);
function freshBubble(sprites) {
var spr = sprites[0];
xp = (((-25) - cameraX) * ((-25) - cameraX)+( 0 - cameraY) * ( 0 - cameraY) + ( 0 - cameraZ)*( 0 - cameraZ));
camera.viewport.project(spr.transform.position, camera.projectionViewMatrix, _outPos);
msg1.scale(300/xp, 300/xp);
msg1.pivot(msg1.width,msg1.height);
msg1.pos(_outPos.x / Laya.stage.clientScaleX,(_outPos.y / Laya.stage.clientScaleY)-20);
}[/code]我这样写 为什么在freshBubble里拿不到这个?有示例可以参考一下吗?感激不尽