开发者

cocos2d schedule cannot be called

开发者 https://www.devze.com 2023-03-10 13:35 出处:网络
I have two schedule in class @A. first one: - (id) init () { self = [super init]; if ( self ) { .... [self schedule:@selector(first:) interval:1.0f];

I have two schedule in class @A.

first one:

 - (id) init ()
{
    self = [super init];
    if ( self ) {

        ....

        [self schedule:@selector(first:) interval:1.0f];
    }
}

second:

- (void) setSomething()

{

    ...

    [self schedule:@selector(second:) interval:1.0/30];

}

the second schedule pro开发者_StackOverflowcessed correctly.But the first one can not be called once.

And when I set interval of first schedule from 1.0f to 0.The first one could be called.

How can I do for the first schedule?


Dude,check your method name that was called by first scheduler.It should be like

-(void)first:(id)sender

{

....

}

0

精彩评论

暂无评论...
验证码 换一张
取 消