Sorry, but I'm going to need a bit more of a hint than that... I've tried... Can you please let me know where I'm going wrong with this, or point me to a relevant example. Many thanks in advance!!! Chuck
@interface OverlayLayer : Layer {
}
@end
// This is the layer where I want the camera fixed using sprites to indicate things
// like user score, time remaining, lives remaining...
@implementation OverlayLayer
-(id) init {
if (self = [super init]) {
CGSize screenSize = [[Director sharedDirector] displaySize];
Sprite *sprite = [[Sprite spriteWithFile:@"life.png"] retain];
[self addChild:sprite z:2];
[sprite setPosition:ccp(screenSize.width/2, screenSize.height/2)];
}
return self;
}
@end
// THis is the layer where I play around with the camera on which the game takes place...
@interface GameLayer : Layer {
}
@implementation
-(id) init {
if ((self = [super init])) {
// To allow the three touch methods to work...
isTouchEnabled = YES;
isAccelerometerEnabled = YES;
[[UIAccelerometer sharedAccelerometer] setUpdateInterval:(1.0f / 60)];
[self addChild: [OverlayLayer new] z:2];
}
return self;
}
@end