Question

- (BOOL) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    CocosNode* spHead = [self getChildByTag:tagHead];
    CocosNode* spBody = [self getChildByTag:tagBody];

    [spHead runAction:fadeOutAction];
    [spBody runAction:fadeOutAction];
}

as the code above, i want the sprites to do some action at the same time, the second one works exactly, but the first one doesn't.

Need help.Anyone can help me?

Was it helpful?

Solution 2

i know

  • (BOOL) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent )event { CocosNode spHead = [self getChildByTag:tagHead]; CocosNode* spBody = [self getChildByTag:tagBody];
    [spHead runAction:fadeOutAction];
    [spBody runAction:[[fadeOutAction copy] autorelease]];

}

then ok

OTHER TIPS

Your fadeOutAction doesn't handle reentrancy?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top