Cocos2dx中的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)停止调用所有函数

猜你喜欢

转载自blog.csdn.net/Jeyaker/article/details/80215050
今日推荐