1
林具有cocos2d的2.0版本=(的Cocos2D 2.0黑屏ccscene
問題的一個大麻煩:啓動應用程序後,我gamescene犯規上去的屏幕,有一個地獄黑屏,無論我做什麼。
這裏走一氣從我的代碼。如果你們儘量幫我= d 感謝
我心底感激!
//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