zoukankan      html  css  js  c++  java
  • coco2d-x CCDirector.h文件中变量*m_pNotificationNode*

    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();
        }
        
       ...
    }
    

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

  • 相关阅读:
    第九次作业
    第八次作业
    第七次作业
    组合数学—递推关系与母函数
    组合数学—排列组合
    三角函数
    OpenCV初步
    计算机视觉如何入门
    GDB调试技巧:总结篇
    PyQt5之窗口类型
  • 原文地址:https://www.cnblogs.com/zjzyh/p/4092069.html
Copyright © 2011-2022 走看看