Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #import "BackgroundLayer.h"
00011
00012 @implementation BackgroundLayer
00013
00014 #pragma mark -
00015 #pragma mark Initialisation
00016
00021 -(id)init
00022 {
00023 self = [super init];
00024
00025 if (self != nil)
00026 {
00027 CGSize winSize = [[CCDirector sharedDirector] winSize];
00028
00029 CCSprite *backgroundImage = [CCSprite spriteWithFile:kFilenameDefBG];
00030 [backgroundImage setPosition:CGPointMake(winSize.width/2, winSize.height/2)];
00031 [self addChild:backgroundImage z:0 tag:0];
00032 }
00033
00034 return self;
00035 }
00036
00037 @end