I am adding a layer to my scene and I want to check when it is fully loaded by setting a boolean after my initialization called doneInitializing
to YES
. But i need to access it somehow... How do I do that ?
LoadingScreen.h
@interface LoadingScreen : CCLayerColor{
CCLayer *hWL;
}
LoadingScreen.m
hWL = [HelloWorldLayer node];
[self addChild:hWL];
if(hWL.doneInitializing == YES){ // that is where I get stuck
//do something
}
I can't access the variable doneInitializing
... WHY ?
HelloWorldLayer.h
@interface HelloWorldLayer : CCLayer
{
BOOL doneInitializing;
}
@property (nonatomic,readwrite) BOOL doneInitializing;
HelloWorldLayer.m
@synthesize doneInitializing;
Is there a better approach to achieve this ??