for(var i=me._birdList.length-1;i>=0;i–){
var bird=me._birdList*;
var distance = cc.pDistance(bird.getPosition(),touch.getLocation());
if(distance<80){
var size=cc.winSize;
var addtime=new cc.LabelTTF("+2","",50);
addtime.setAnchorPoint(1,1);
addtime.setPosition(size.width-80,size.height-130);
addtime.runAction(new cc.moveTo(0.2,cc.p(size.width-80,size.height-75)));
addtime.setFontFillColor(cc.color.ORANGE);
me.addChild(addtime);
function hello(){
addtime.removeFromParent();
}
window.setTimeout(hello,500);
me._scoreValue+=1;
me._countdown+=1000;
me._count+=1;
me._score.setString(me._scoreValue);
var bcloud=new cc.NodeGrid();
bcloud.addChild(new cc.Sprite(res.boomcloud2_png));
bcloud.setScale(-0.25,0.25);
bcloud.setPosition(bird.getPositionX(),bird.getPositionY());
me._birdLayer.addChild(bcloud);
me._birdList.splice(i,1);
bird.removeFromParent();
var shaky=new cc.ShakyTiles3D(0.4,cc.size(50,50),3,false);
var shuffle=new cc.ShuffleTiles(0.5,cc.size(50,50),100);
var vanish=new cc.TurnOffTiles(0,cc.size(50,50),3);
bcloud.runAction(new cc.Sequence(shaky,shuffle,vanish));
function hello2(){
bcloud.removeFromParent();
}
window.setTimeout(hello2,500);
}
}
在初学一个打鸟的教程,自己改了一下。在遍历的过程中,发现假如两个鸟重叠了但是被一起击中的话,没法同时对两个鸟显示特效并移出屏幕。求大神指导应该怎么改才好啊
*