解决方案 »

  1.   

    还有谁可以告诉我这段程序编译时没错,运行时怎么打不开窗口啊
    bool HelloWorld::init()
    {
        bool bRet = false;
        do 
        {
            //////////////////////////////////////////////////////////////////////////
            // super init first
            //////////////////////////////////////////////////////////////////////////        CC_BREAK_IF(! CCLayer::init()); CCSpriteFrameCache *pFrameCache = CCSpriteFrameCache::sharedSpriteFrameCache();
    CC_BREAK_IF(!pFrameCache);
    pFrameCache->addSpriteFramesWithFile("game.plist"); CCSprite * sprite;
    CCSpriteFrame * spriteFrame;
    char str[10];
    CCArray * pArray = CCArray::createWithCapacity(8); for(int i=0;i<8;i++)
    {
    sprintf(str,"1(%d)",i+1);
    spriteFrame = pFrameCache->spriteFrameByName(str);
    pArray->addObject(spriteFrame);
    if(i == 0)
    {
    sprite = CCSprite::createWithSpriteFrame(spriteFrame);
    sprite->setPosition(ccp(50,50));
    this->addChild(sprite);
    }
    } CCAnimation * pAnimation = CCAnimation::createWithSpriteFrames(pArray,0.2f);
    CCAnimate * pAnimate = CCAnimate::create(pAnimation);
    this->runAction(CCRepeatForever::create(pAnimate));        bRet = true;
        } while (0);    return bRet;
    }
      

  2.   

    调试的时候是这个语句通不过
    pFrameCache->addSpriteFramesWithFile("game.plist"); 
    可是我加载了game.plist和game.png到项目文件的resource文件夹啊,怎么回事啊,底下显示生成成功,半天弹出个窗口显示停止工作。
      

  3.   

    这个问题解决了,可是没人答,就这么浪费了分吗?大神们帮看下这个问题吧。
    http://bbs.csdn.net/topics/390660620
    答的好,这的分就送你。