Guest User

Untitled

a guest
Oct 23rd, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. void Node::addChild(Node *child){
  2. CCASSERT( child != nullptr, "Argument must be non-nil");
  3. this->addChild(child, child->_localZOrder, child->_name);
  4. }
  5.  
  6. void Node::addChild(Node* child, int localZOrder, const std::string &name){
  7. ...
  8. addChildHelper(child, localZOrder, INVALID_TAG, name, false);
  9. }
  10.  
  11. void Node::addChildHelper(Node* child, int localZOrder, int tag, const std::string &name, bool setTag){
  12. ...
  13. this->insertChild(child, localZOrder);
  14. ...
  15. }
  16.  
  17. void Node::insertChild(Node* child, int z){
  18. _transformUpdated = true;
  19. _reorderChildDirty = true;
  20. _children.pushBack(child);
  21. child->_localZOrder = z;
  22. }
Add Comment
Please, Sign In to add comment