首先,说下蓝色启动页是什么样的:
左上角是个ip地址,右边有个cocos的小人图标的PLAY按钮。
然后,蓝色启动页的代码在AppDelegate.cpp中:
#if (COCOS2D_DEBUG > 0 && CC_CODE_IDE_DEBUG_SUPPORT > 0)
// NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
if (_launchMode)
{
startRuntime();
}
else
{
engine->executeScriptFile(ConfigParser::getInstance()->getEntryFile().c_str());
}
startRuntime()就是显示蓝色启动页的代码,一步一步跟进去就看到了。
去掉方法:
1.有说打包之后自动就不显示的,但亲测之后,android打包后确实没有蓝色启动页,mac电脑和ios系统依旧有。
2.更改AppDelegate.cpp代码:
我是用了比较直接的方法,更改_launchMode为0(之前是1)。
AppDelegate::AppDelegate()
:_launchMode(0)
{
}