Question

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

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

comme le code ci-dessus, je veux que les sprites fassent une action en même temps, le second fonctionne exactement, mais pas le premier.

Besoin d'aide? Tout le monde peut m'aider?

Était-ce utile?

La solution 2

je sais

  
      
  • (BOOL) ccTouchesEnded: (NSSet *) touche l'événement withEvent: (UIEvent )   {       CocosNode spHead = [self getChildByTag: tagHead];       CocosNode * spBody = [self getChildByTag: tagBody];
  •   
    [spHead runAction:fadeOutAction];
    [spBody runAction:[[fadeOutAction copy] autorelease]];

}

alors ok

Autres conseils

Votre fadeOutAction ne gère pas la réentrance?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top