How can I pass
-(void)explosionFromPoint:(CGPoint)explosionPoint withSprite:(CCSprite*)sprite;
in a
[self performSelector:@selector(//Right here) withObject:nil afterDelay:3];
?
You cant put the whole selector inside the @selector()
, and withObject
first of all only allows one object to be passed over, and neither do I understand how to use it.
How can I pass a method with objects after a delay? I also tried a workaround where I call
[self performSelector:@selector(waitExplosion) withObject:nil afterDelay:3];
which then runs the action itself, [self explosionFromPoint:c0TileCoord withSprite:bomb];
, but this is a really bad way to do it as I have to re-declare the variables and it's just bad.
How can I pass a method with objects after a delay?