运行动作导致异常 - (cocos2d-iphone)

时间:2013-04-17 07:09:45

标签: iphone ios cocos2d-iphone

当我把

[_nextProjectile runAction:[CCSequence actions:
                            [CCRotateTo actionWithDuration:rotateDuration angle:cocosAngle],
                            [CCCallFunc actionWithTarget:nil selector:nil],
                            nil]];

xcode在execute方法

中引发异常

pragma mark CCCallFuncN

@implementation CCCallFuncN

-(void) execute
{
    [targetCallback_ performSelector:selector_ withObject:target_];
}

@end

没有runAction它工作正常.. 任何人都可以帮忙! ?

1 个答案:

答案 0 :(得分:1)

删除以下行:

[CCCallFunc actionWithTarget:nil selector:nil],

或者做这样的事情:

[_nextProjectile runAction:[CCSequence actions:
                            [CCRotateTo actionWithDuration:rotateDuration angle:cocosAngle],
                            [CCCallFunc actionWithTarget:self selector:@selector(execute)],
                            nil]];


-(void) execute
{

}