我正在尝试从屏幕上淡出标签,然后在完成之后将其从视图中删除。如何排队,以便视图在删除之前等待标签完全褪色?
id sequence = [CCSequence actions:[splashLabel runAction:[CCFadeOut actionWithDuration:0.5]], [self removeChild:splashLabel cleanup:YES], nil];
[self runAction:sequence];
答案 0 :(得分:1)
id fade=[CCFadeOut actionWithDuration:1.0f];
id delay=[CCDelayTime actionWithDuration:0.2];
id seqq=[CCSequence actions:fade,delay,nil];
[splashLabel runAction:seqq];
id stopAni=[splashLabel stopAllActions];
id remove=[self removeChild:splashLabel cleanup:YES];
[self runAction:[CCSequence actions:stopAni,remove,nil]];