coco2d-x CCDirector.h文件中变量*m_pNotificationNode*
2014-11-12 13:48
375 查看
1.在CCDiretor.h中有如下说明
2.在CCDiretor.cpp的成员函数
这个地方说明了这个节点是一直存在,所以这个可以由大家自由发挥实现各自的用途(对于程序中从开始到结束一直存在的元素的处理都可以放在这里处理)
/** 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(); } ... }
这个地方说明了这个节点是一直存在,所以这个可以由大家自由发挥实现各自的用途(对于程序中从开始到结束一直存在的元素的处理都可以放在这里处理)
相关文章推荐
- coco2d-x CCDirector.h文件中变量m_pNotificationNode
- coco2d学习之CCNodeColor
- CCAtlasNode(CCAtlasNode封装了一个CCTextureAtlas的变量,CCTextureAtlas初始化图片文件的时候会把图片加载到缓存(CCTextureCache)中:)
- 【3】coco2d-x 核心类之CCNode以及coco2d-x的坐标系
- CCClippingNode 的简单使用(coco2d-x 2.2.4)
- drupal7 node.tpl.php文件 及其所用到的变量
- Cocos-2d几个关键类小结CCNode、CCScene、CCLayer、CCDirector、CCAction
- 编译Coco2d-x android 程序出现make: *** No rule to make target ...CCConfiguration.o'. Stop.
- coco2d-x 终端向Classes文件中添加新类
- node源码详解(七) —— 文件异步io、线程池【互斥锁、条件变量、管道、事件对象】
- 如何在.cc源码中通过变量向trace文件输入调试信息
- coco2d-x CCScrollView实现关卡选择 新手引导 帮助界面
- coco2d-x 3.0 alpha1 添加 #include "CocosGUI.h" 头文件时出现链接错误
- 编译Coco2d-x android 程序出现make: *** No rule to make target ...CCConfiguration.o'. Stop
- 编译Coco2d-x android 程序出现make: *** No rule to make target ...CCConfiguration.o'. Stop.
- 【Cocos2d-x 3.0学习笔记】coco2d-s 读取plist 文件报错
- 【10】coco2d-x CCTextFieldTTF最简单的方法实现密码登陆“*”
- coco2d-x CCScrollView实现背包翻页
- coco2d ClippingNode制作不规则血条
- 编译Coco2d-x android 程序出现make: *** No rule to make target ...CCConfiguration.o'. Stop.