景切换的时候加上遮罩
生活随笔
收集整理的這篇文章主要介紹了
景切换的时候加上遮罩
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
//在場景切換的時(shí)候加上遮罩
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;}
?
轉(zhuǎn)載于:https://www.cnblogs.com/jiackyan/archive/2013/04/14/3019908.html
總結(jié)
以上是生活随笔為你收集整理的景切换的时候加上遮罩的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [HDU] 1181 变形课-简单建模后
- 下一篇: 【基础】哥德巴赫猜想