So I have a selector that need to be perform after certain amount of delay / interval, and I still can’t find the solution. Put CCDelayTime before the CCCallFunc in CCSequence doesn’t work. But it’s working at simply put something like schedule:interval: or performselector:afterdelay.
if (shootDelay > kBlastBombLaunchingDelay) {
[self createFireProgressBar];
action = [CCSequence actions:
[CCDelayTime actionWithDuration: kBlastBombLaunchingDelay],
[CCCallFunc actionWithTarget:self selector:@selector(launchBomb)],
nil];
//[self performSelector:@selector(launchBomb) withObject:nil afterDelay:kBlastBombLaunchingDelay];
//[self schedule:@selector(launchBomb) interval:kBlastBombLaunchingDelay];
shootDelay = 0;
}
[self runAction:action];
Somehow, the selector launchBomb is not called. Sorry for the silly question.
You don’t seem to have called:User found own solution
I think I’ve found the solution. Just like I said earlier, it’s a silly question, the error was because of my messy algorithm. Put a lower value than kBlastBombLaunchingDelay for the CCDelayTime and change the if position to the statement which change my hero state. And it works now.