您的位置:首页 > Web前端 > Node.js

coco2d-x CCDirector.h文件中变量*m_pNotificationNode*

2014-11-12 13:48 375 查看
1.在CCDiretor.h中有如下说明

/** This object will be visited after the main scene is visited.
This object MUST implement the "visit" selector.
Useful to hook a notification object, like CCNotifications
(http://github.com/manucorporat/CCNotifications)
@since v0.99.5
*/
CCNode* getNotificationNode();
void setNotificationNode(CCNode *node)

2.在CCDiretor.cpp的成员函数
drawScene()


// Draw the Scene
void CCDirector::drawScene(void)
{
...
// draw the scene
if (m_pRunningScene)
{
m_pRunningScene->visit();
}

// draw the notifications node
if (m_pNotificationNode)
{
m_pNotificationNode->visit();
}

...
}


这个地方说明了这个节点是一直存在,所以这个可以由大家自由发挥实现各自的用途(对于程序中从开始到结束一直存在的元素的处理都可以放在这里处理)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: