objective c - Cocos2d Selector with multiple args -


lets wanna call cocos2d method after 2 seconds, this:

[self runaction:[ccsequence actions:                      [ccdelaytime actionwithduration:2],                      [cccallfunc actionwithtarget:[gamescene sharedscene] selector:@selector(gameoverandlost:) withobject:true],                      nil]]; 

i'm trying send bool method, somehow doesn't seam way

- (void) gameoverandlost:(bool)bol 

anyone know's i'm doing wrong here? quite simple task, i'm not used objc

one mistake in code: used cccallfunc instead of cccallfuncn. (cccallfunc not takes argument).

        [cccallfuncn actionwithtarget:self selector:@selector(gameoverandlost:)]; 

to send multiple argument, better go cccalblockn.

id calfun = [cccallblockn actionwithblock:^(ccnode* node)      {         //control comes here when block executed...         //here can access class member variables , variables in same function     }     ]; 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -