diff --git a/cocos2dx/include/CCDirector.h b/cocos2dx/include/CCDirector.h index b3219f68a5..02ea9d7ae0 100755 --- a/cocos2dx/include/CCDirector.h +++ b/cocos2dx/include/CCDirector.h @@ -35,6 +35,7 @@ THE SOFTWARE. #include "CCGeometry.h" #include "CCEGLView.h" #include "CCGL.h" +#include "CCNode.h" namespace cocos2d { @@ -137,7 +138,6 @@ typedef enum { class CCLabelTTF; class CCScene; class CCEGLView; -class CCNode; class CCProjectionProtocol; /** @@ -211,6 +211,19 @@ public: */ 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