Problem with accessing classes from another class.
- by srikanth rongali
I have a classA, classB,classC. I have another class classABC; All are CCLayer inherited.
I need to call all the classA, classB, classC from classABC.
#import <Foundation/Foundation.h>
#import "cocos2d.h"
@interface classABC : CCLayer {
classA *aClass;
}
@property(nonatomic, retain)classA *aClass;
@end
#import "classABC"
#import "classA.h"
#import "classB.h"
#import "classC.h"
@implementation classABC
-(id)init
{
if( (self = [super init]) )
{
ClassA *aClass = [[ClassA alloc]init];
CCScene *aClassS = [CCScene node];
CCLayer * aClassL = [aClass node];
[aClassS addChild: aClassL];
[[CCDirector sharedDirector] setAnimationInterval:60.0/60];
[[CCDirector sharedDirector] replaceScene: aClass];
}
return self;
}
@end
But I am not getting the classA displayed. How should I do it ?
Thank You.