fixed #760: add functions to get/add m_pNotificationNode

This commit is contained in:
minggo 2011-11-23 17:18:53 +08:00
parent c7aac6b526
commit c3a034a19b
1 changed files with 14 additions and 1 deletions

View File

@ -35,6 +35,7 @@ THE SOFTWARE.
#include "CCGeometry.h" #include "CCGeometry.h"
#include "CCEGLView.h" #include "CCEGLView.h"
#include "CCGL.h" #include "CCGL.h"
#include "CCNode.h"
namespace cocos2d { namespace cocos2d {
@ -137,7 +138,6 @@ typedef enum {
class CCLabelTTF; class CCLabelTTF;
class CCScene; class CCScene;
class CCEGLView; class CCEGLView;
class CCNode;
class CCProjectionProtocol; class CCProjectionProtocol;
/** /**
@ -211,6 +211,19 @@ public:
*/ */
inline bool isSendCleanupToScene(void) { return m_bSendCleanupToScene; } inline bool isSendCleanupToScene(void) { return m_bSendCleanupToScene; }
/** 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
*/
inline CCNode* getNotificationNode() { return m_pNotificationNode; }
inline void setNotificationNode(CCNode *node)
{
CC_SAFE_RELEASE(m_pNotificationNode);
m_pNotificationNode = node;
CC_SAFE_RETAIN(m_pNotificationNode);
}
// window size // window size