Objective c 具有多个参数的Cocos2d选择器

Objective c 具有多个参数的Cocos2d选择器,objective-c,cocos2d-iphone,Objective C,Cocos2d Iphone,假设我想在2秒钟后调用cocos2d方法,如下所示: [self runAction:[CCSequence actions: [CCDelayTime actionWithDuration:2], [CCCallFunc actionWithTarget:[GameScene sharedScene] selector:@selector(GameOverAndLost:) withObject:TRUE],

假设我想在2秒钟后调用cocos2d方法,如下所示:

[self runAction:[CCSequence actions:
                     [CCDelayTime actionWithDuration:2],
                     [CCCallFunc actionWithTarget:[GameScene sharedScene] selector:@selector(GameOverAndLost:) withObject:TRUE],
                     nil]];
我试着给这个方法发一个BOOL,但不知怎么的,这不是办法

- (void) GameOverAndLost:(BOOL)bol

有人知道我做错了什么吗?这是一项非常简单的任务,但我确实不习惯ObjC,代码中有一个错误:使用了CCCallFunc而不是CCCallFunc。(CCCallFunc不接受任何参数)

要发送多个参数,最好选择CCCalBlockN

id calFun = [CCCallBlockN actionWithBlock:^(CCNode* node) 
    {
        //control comes here when block is executed...
        //here you can access class member variables and variables in same function
    }
    ];

代码中有一个错误:使用了CCCallFunc而不是CCCallFunc。(CCCallFunc不接受任何参数)

要发送多个参数,最好选择CCCalBlockN

id calFun = [CCCallBlockN actionWithBlock:^(CCNode* node) 
    {
        //control comes here when block is executed...
        //here you can access class member variables and variables in same function
    }
    ];

它仍然无法正常工作,我尝试了以下方法:[CCCallFunnd actionWithTarget:[GameSecene sharedScene]选择器:@selector(GameOverAndLost:)data:@“dostuff”],它不再崩溃,但问题是如果我记录我收到的内容。。我没有发现任何语法错误,[CCCallFuncND actionWithTarget:self-selector:@selector(GameOverAndLost:data:)data:@“dostuff”];同时在游戏场景中写入函数-(void)GameorAndLost:(id)发送方数据:(void*)数据。同时签出:它仍然无法工作,我尝试了以下方法:[CCCallFunnd actionWithTarget:[GameScene sharedScene]选择器:@selector(GameorAndLost:)数据:@“dostuff”],并且它不再崩溃,但问题是如果我记录下我收到的。。我没有发现任何语法错误,[CCCallFuncND actionWithTarget:self-selector:@selector(GameOverAndLost:data:)data:@“dostuff”];还要在游戏场景中写入函数-(void)GameOverAndLost:(id)sender data:(void*)数据。还要签出此项: