1
임 : 시작 응용 프로그램 후, 내 gamescene 화면을 이동 나던, 내가 어떤 지옥 검은 화면이 있습니다. 여기 적인 Cocos2D 2.0 검은 화면 ccscene
내 코드에서 스트레칭을 이동합니다. 너희들은 D = 감사를 도와하려고하면 이 감사 I`ll!//AppDelegate from cocos2d basic template, I change this line
[director_ pushScene:[GameScene node]];
//my GameScene class implementation
- (id)init
{
if(self != nil)
{
BackgroundLayer *backgroundLayer = [BackgroundLayer node];
[self addChild:backgroundLayer z:0];
}
return self;
}
//then, my BackgroundLayer class implementation
- (id)init
{
if(self != nil)
{
CCSprite *backgroundImage = [CCSprite spriteWithFile:@"backgroundiPhone.png"];
CGSize screenSize = [[CCDirector sharedDirector] winSize];
[backgroundImage setPosition:CGPointMake(screenSize.width/2, screenSize.height/2)];
//yea the image is in the project, maybe if I add some color at the sprite to be sure?
[self addChild:backgroundImage z:0 tag:0];
}
return self;
}
OMG !!! 나는 그것을 완전히 잊었습니다 = s 고맙습니다. –
당신은 =) – Morion