나는 일반적으로 내 게임 중 하나에서이 코드 조각 같은 뭔가가 필요 이런 종류의를 충족 :
float stall;
CCAnimation *secondAnim;
CCSprite *secondSprite;
NSString *dyingFx;
id sound = (self.alive ? [GENoopAction action] :
[GEPlayFx actionWithSoundFile:dyingFx]
);
id second = [CCSequence actions:
[CCDelayTime actionWithDuration:stall]
, [CCShow action]
, sound
, [CCAnimate actionWithAnimation:secondAnim]
, [CCCallFunc actionWithTarget:self selector:@selector(hurtComplete)]
];
secondSprite.visible= NO;
[secondSprite runAction:second];
GEPlayFx 및 GENoopAction 내가 나 자신 (CCActionInstant 구현)에 대해 만든 장난감입니다.
Dunno that. 그러나 당신의 예에서, 당신은 방법을 계획함으로써 그것을 할 수 있습니다. 기본적으로 애니메이션의 프레임 당 지연이 0.05 인 경우 (0.05 * 15) 트리거 할 메소드를 예약해야합니다. 이러한 메서드는 다른 애니메이션을 실행합니다. – Voldemort