i=0;
while (i<10)
{
var objectLabel = cc.Sprite("res/rect.png", cc.rect(0, 0, 100, 100));
function getRandomInt(min, max)
{
return Math.floor(Math.random() * (max - min + 1)) + min;
}
objectLabel.x = getRandomInt(50, size.width);
objectLabel.y = size.height-40;
setTimeout(this.addChild(objectLabel, 5), 500);
objectLabel.runAction(cc.spawn(cc.moveBy(0.8, cc.p(0, size.height*(-1)+210))));
i++;
}
如何设置每 0.6 秒执行一次 WHILE 的延迟计时器?