void HelloWorld::jumpToGameOver(){
// //保存图片
Size visibleSize=Director::getInstance()->getWinSize();
// //定义一个屏幕大小的渲染纹理
RenderTexture* renderTexture = RenderTexture::create(visibleSize.width,visibleSize.height,Texture2D::PixelFormat::RGBA8888);
Scene* curScene = Director::getInstance()->getRunningScene();
// //渲染纹理开始捕捉
renderTexture->begin();
// //绘制当前场景
curScene->visit();
// //结束
renderTexture->end();
// //保存png
renderTexture->saveToFile("screenshoot.png",Image::Format::PNG);
//说Node正在工作,你打断他了,感觉来了加个pause,success!!
curScene->pause();
//跳转到GameOver
Director::getInstance()->replaceScene(GameOver::createScene());
}