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.
精彩评论