Merge pull request #7967 from minggo/remove-_setLocalZOrder

deprecated Node::_setZOrder()
This commit is contained in:
minggo 2014-09-09 14:20:00 +08:00
commit 162fb3ec18
2 changed files with 11 additions and 0 deletions

View File

@ -295,6 +295,13 @@ void Node::setLocalZOrder(int z)
_eventDispatcher->setDirtyForNode(this); _eventDispatcher->setDirtyForNode(this);
} }
/// zOrder setter : private method
/// used internally to alter the zOrder variable. DON'T call this method manually
void Node::_setLocalZOrder(int z)
{
_localZOrder = z;
}
void Node::setGlobalZOrder(float globalZOrder) void Node::setGlobalZOrder(float globalZOrder)
{ {
if (_globalZOrder != globalZOrder) if (_globalZOrder != globalZOrder)

View File

@ -151,6 +151,10 @@ public:
CC_DEPRECATED_ATTRIBUTE virtual void setZOrder(int localZOrder) { setLocalZOrder(localZOrder); } CC_DEPRECATED_ATTRIBUTE virtual void setZOrder(int localZOrder) { setLocalZOrder(localZOrder); }
/* Helper function used by `setLocalZOrder`. Don't use it unless you know what you are doing.
*/
CC_DEPRECATED_ATTRIBUTE virtual void _setLocalZOrder(int z);
/** /**
* Gets the local Z order of this node. * Gets the local Z order of this node.
* *