deprecated Node::_setZOrder()

This commit is contained in:
minggo 2014-09-09 10:55:27 +08:00
parent 6b99ce6ec0
commit 31c508ef6d
2 changed files with 11 additions and 0 deletions

View File

@ -295,6 +295,13 @@ void Node::setLocalZOrder(int z)
_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)
{
if (_globalZOrder != globalZOrder)

View File

@ -150,6 +150,10 @@ public:
virtual void setLocalZOrder(int 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.