Cocos2d-x中的Node节点
创建节点:
Node*childNode = Node::create()
增加新的子节点:
node–>addChild(Node* childNode,int localZOrder,int tag)
查找子节点:
Node* node = node–>getChildByTag(int tag)
删除子节点:
node–>removeChildByTag(int tag,true)删除子节点,并停止所有该节点上的一切动作
node–>removeChild(childNode)通过Node指针删除节点
node–>removeAllChildrenWithCleanup(true)删除所有子节点,并停止这些子节点上的一切动作
node–>removeFromParentAndCleanup(true)从父Node中删除节点,并停止所有该节点上的一切动作
position(位置)和anchorPoint(锚点)
void scheduleUpdate(void)定时(1/60秒)每帧回调update(float dt)函数
void schedule(SEL_SCHEDULE selector,float interval)指定回调函数,指定回调时间间隔
void unscheduleUpdate(void)停止调用update函数
void unschedule(SEL_SCHEDULE selector)停止调用指定函数
void unscheduleAllSelectors(void)停止调用所有函数