开发者

if( (self=[super init] ) )?

why if i am trying to call animation function in cocos2d like this :

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

    }
        return self;
开发者_如何学Python    }

its working great, but when i do this :

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


    }
        return self;
    }

the animation is called but not being played ??? or i cant see it ?? i just cant understand that.


It is natural that base class's init is doing something important that is required to run the animation. That's why when you are trying to run animation before calling init of base class animation is not playing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜