diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index defdfb7665..ec434554ea 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1464,14 +1464,14 @@ public: virtual void setOpacityModifyRGB(bool value) {CC_UNUSED_PARAM(value);} virtual bool isOpacityModifyRGB() const { return false; }; - void setOnEnterCallback(const std::function& callback) {onEnterCallback = callback;} - const std::function& getOnEnterCallback() const {return onEnterCallback;} - void setOnExitCallback(const std::function& callback) {onExitCallback = callback;} - const std::function& getOnExitCallback() const {return onExitCallback;} - void setonEnterTransitionDidFinishCallback(const std::function& callback) {onEnterTransitionDidFinishCallback = callback;} - const std::function& getonEnterTransitionDidFinishCallback() const {return onEnterTransitionDidFinishCallback;} - void setonExitTransitionDidStartCallback(const std::function& callback) {onExitTransitionDidStartCallback = callback;} - const std::function& getonExitTransitionDidStartCallback() const {return onExitTransitionDidStartCallback;} + void setOnEnterCallback(const std::function& callback) { _onEnterCallback = callback; } + const std::function& getOnEnterCallback() const { return _onEnterCallback; } + void setOnExitCallback(const std::function& callback) { _onExitCallback = callback; } + const std::function& getOnExitCallback() const { return _onExitCallback; } + void setonEnterTransitionDidFinishCallback(const std::function& callback) { _onEnterTransitionDidFinishCallback = callback; } + const std::function& getonEnterTransitionDidFinishCallback() const { return _onEnterTransitionDidFinishCallback; } + void setonExitTransitionDidStartCallback(const std::function& callback) { _onExitTransitionDidStartCallback = callback; } + const std::function& getonExitTransitionDidStartCallback() const { return _onExitTransitionDidStartCallback; } CC_CONSTRUCTOR_ACCESS: // Nodes should be created using create(); @@ -1611,10 +1611,10 @@ protected: static int s_globalOrderOfArrival; - std::function onEnterCallback; - std::function onExitCallback; - std::function onEnterTransitionDidFinishCallback; - std::function onExitTransitionDidStartCallback; + std::function _onEnterCallback; + std::function _onExitCallback; + std::function _onEnterTransitionDidFinishCallback; + std::function _onExitTransitionDidStartCallback; private: CC_DISALLOW_COPY_AND_ASSIGN(Node);