景切换的时候加上遮罩
生活随笔
收集整理的这篇文章主要介绍了
景切换的时候加上遮罩
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
//在场景切换的时候加上遮罩
CCLayerColor *layer = CCLayerColor::create(ccc4(1,22,33,233), sizef.width, sizef.height);CCLog("%f,%f",sizef.width,sizef.height);CCLabelTTF*test=CCLabelTTF::create("等待。。。。","Helvetica", 12);layer->addChild(test);test->setColor(ccc3(3, 4, 5));test->cocos2d::CCNode::setPosition(sizef.width/2, sizef.height/2);CCDirector::sharedDirector()->setNotificationNode(layer);CCDirector::sharedDirector()->drawScene();CCDirector::sharedDirector()->replaceScene(HelloWorld::scene());//在scene return 后去掉遮罩
CCScene* HelloWorld::scene(){CCScene *scene = CCScene::create();HelloWorld *layer = HelloWorld::create();scene->addChild(layer);CCDirector::sharedDirector()->setNotificationNode(NULL);return scene;}
转载于:https://www.cnblogs.com/jiackyan/archive/2013/04/14/3019908.html
总结
以上是生活随笔为你收集整理的景切换的时候加上遮罩的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: [HDU] 1181 变形课-简单建模后
- 下一篇: 【基础】哥德巴赫猜想