当我选择精灵类型时,我想从节点中删除精灵,它只进行缩放而不是从节点中删除。请帮我。 提前谢谢。
for (ImageView *cookie in chain.cookies) {
// 1
if (cookie.sprites != nil) {
// 2
CCActionScaleTo *Scaleaction =[CCActionScaleTo actionWithDuration:0.3 scale:0.1];
CCActionCallBlock *action2=[CCActionCallBlock actionWithBlock:^{
[self removeFromParentAndCleanup:YES];
}];
// CCAction *scaleAction = [SKAction scaleTo:0.1 duration:0.3];
//scaleAction.timingMode = SKActionTimingEaseOut;
[cookie.sprites runAction:[CCActionSequence actionWithArray:@[Scaleaction,action2]]];
// 3
cookie.sprites = nil;
}
}
}