I am trying to have AtlasSprite as a parent class but it's giving me errors on propreties. Like it can't seem to find them: Here's the code extract.
interface:
@interface Glyph : AtlasSprite{
float eyelevel;
}
@property (readwrite,assign) float eyelevel;
-(id) initWithMgr:(id) mgr;
implementation:
@implementation Glyph
@synthesize eyelevel;
-(id) init {
if( (self=[super init] )) {
eyelevel = 0;
}
return self;
}
-(id) initWithMgr:(id) mgr{
if( (self=[super init] )) {
[self init];
self = [AtlasSprite spriteWithRect:CGRectMake(0, 0, 119, 45) spriteManager: mgr];
}
return self;
}
here are the calls to this class:
AtlasSpriteManager *mgr = AtlasSpriteManager spriteManagerWithFile:@"atlas_glyph.png" capacity:3];
Glyph *glyph = [[Glyph alloc] initWithMgr:mgr];
[glyph setEyelevel:0];
It keeps crashing for me when it hits [glyph setEyelevel:0]; , saying it doesn't recognize the selector to the instance. Any help?