Merge pull request #581 from minggo/iss760_set_NotificationNode

fixed #760: add functions to get/add m_pNotificationNode
This commit is contained in:
minggo 2011-11-23 01:20:07 -08:00
commit bbdbdbce9f
1 changed files with 14 additions and 1 deletions

View File

@ -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