各位高手:
我刚刚接触cocos2d-x,遇到个问题,请教一下各位,就是创建一个工程后,在HellowWorldScene.cpp中添加几个图片,
在vs2010中正常运行,可是在android真机上,程序却毫无提示地退出了,不知道什么原因,代码如下:
// add “HelloWorld” splash screen"
CCSprite* pSprite = CCSprite::create(“HellowWorld.png”);
// position the sprite on the center of the screen
pSprite->setPosition( ccp(size.width/2, size.height/2) );
// add the sprite as a child to this layer
this->addChild(pSprite, 0);
CCSprite* pJoker;
pJoker= CCSprite::create(“1.png”);
//pJoker->setScaleX(.2);
//pJoker->setScaleY(.2);
pJoker->setPosition(ccp(size.width/2 * 1, size.height/2));
this->addChild(pJoker,1);
pJoker = CCSprite::create(“2.jpg”);
//pJoker->setScaleX(.2);
//pJoker->setScaleY(.2);
pJoker->setPosition(ccp(size.width/5 * 2, size.height/2));
this->addChild(pJoker, 1);
…