Skip to content

Commit e9d3191

Browse files
committed
Minor demo changes to match demo-x
1 parent d8ece5e commit e9d3191

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

templates/cocos2d iOS demo.xctemplate/Classes/loadScene.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ - (id)init
3737
// NOTE!
3838
// In this case, this is also the artwork for the entire app, but in real life this would probably not be the case
3939
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"demo.plist"];
40+
41+
// get screen dimensions
42+
CGSize size = [CCDirector sharedDirector].viewSize;
4043

4144
// background
4245
CCSprite9Slice *background = [CCSprite9Slice spriteWithImageNamed:@"white_square.png"];
4346
background.anchorPoint = CGPointZero;
44-
background.contentSize = [CCDirector sharedDirector].viewSize;
47+
background.position = CGPointZero;
48+
background.contentSize = size;
4549
background.color = [CCColor grayColor];
4650
[self addChild:background];
4751

@@ -64,9 +68,6 @@ - (id)init
6468
_loadStep = 0;
6569
[self schedule:@selector(loadNext:) interval:0.033];
6670

67-
// enable touch handing
68-
self.userInteractionEnabled = YES;
69-
7071
// done
7172
return self;
7273
}

0 commit comments

Comments
 (0)