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

1.在CCDiretor.h中有如下说明

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

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

 
 
  1. // Draw the Scene
  2. void CCDirector::drawScene(void)
  3. {
  4. ...
  5. // draw the scene
  6. if (m_pRunningScene)
  7. {
  8. m_pRunningScene->visit();
  9. }
  10. // draw the notifications node
  11. if (m_pNotificationNode)
  12. {
  13. m_pNotificationNode->visit();
  14. }
  15. ...
  16. }

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值