退出cocos2dx崩溃

调用cocos2d::Director::getInstance()->end();会崩溃在这个地方,有人遇到这个问题没有,求大神解决一下

那个平台?

ios

iOS就不要调用整个方法了,直接exit()吧。

不过也不应该崩溃,你的引擎版本是什么?

我们现在是直接把cocod2dx 当做一个模块放在项目中,现在退出这么模块不知该怎么退出cocos ,调用cocos2d::Director::getInstance()->end();会崩溃。Director好像没有exit()函数。有函数退出吗

    cocos2d::Application *app = cocos2d::Application::getInstance();
    
    // Initialize the GLView attributes
    app->initGLContextAttrs();
    cocos2d::GLViewImpl::convertAttrs();
    
    
    _shareClient.eaglView = [FSEAGLView viewWithFrame: [UIScreen mainScreen].bounds
                              pixelFormat: (__bridge NSString *)cocos2d::GLViewImpl::_pixelFormat
                              depthFormat: cocos2d::GLViewImpl::_depthFormat
                       preserveBackbuffer: NO
                               sharegroup: nil
                            multiSampling: NO
                          numberOfSamples: 0 ];
    
    // Enable or disable multiple touches
    [_shareClient.eaglView setMultipleTouchEnabled:YES];
    
    _shareClient.eaglView .backgroundColor =[UIColor clearColor];
    
    cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_shareClient.eaglView);
    cocos2d::Director::getInstance()->setOpenGLView(glview);

// glview->enableAntiAlias(false);

    //run the cocos2d-x game scene
    app->run(); 这个使进入是创建cocos 的代码

Cocos2d-x 3.15.1 Release Notes

之前引擎设计是没有考虑这种使用情况的,要达到这样的目的得自己改了。

跪求cocos2D程序员 ,10k-20K,1年经验即可,南山大冲上班,弹性上班时间,双休,五险一金,免费体检,年假,下午茶,团建,绩效奖金,福利应有尽有!

有意向的小伙伴可以微信联系我(983445651)哦~

@983445651 请到招聘分组下去发帖子。如果导出在别的帖子发这样的帖子的话,小心被封号。