Cocos2xd__节点

class Node : public Ref

1. 节点创建:

  Node * Node::create()

2. 添加子节点:

  void addChild(Node *child)

  void addChild(Node *child, int zOrder)

  void addChild(Node *child, int localZOrder, int tag)

  void addChild(Node* child, int localZOrder, const std::string& name)

  void addChildHelper(Node* child, int localZOrder, int tag, const std::string &name, bool setTag)

3. 查找子节点:
  Node* getChildByTag(int tag) const

  Node* getChildByName(const std::string& name) const

4. 删除子节点:
  void removeChild(Node* child, bool cleanup /* = true */)

  void removeChildByTag(int tag, bool cleanup /* = true */)

  void removeChildByName(const std::string &name, bool cleanup)

  void Node::removeAllChildren()

  void Node::removeAllChildrenWithCleanup(bool cleanup)

  void Node::removeFromParent()

  void Node::removeFromParentAndCleanup(bool cleanup)

5. 两个重要属性:

  a. AnchorPoint

  b. Position

  

猜你喜欢

转载自www.cnblogs.com/teternity/p/Cocos2xd__Node.html