Cocos2d iphone can';t停止cocos2d中的操作

Cocos2d iphone can';t停止cocos2d中的操作,cocos2d-iphone,Cocos2d Iphone,我在ccmen上有一个动作,它是CCLayer的一个孩子,他是滚动条的孩子。(cocos2d的滚动层类) 此ccmen上正在运行一个操作,它有一个名称和一个标记 我就是停不下来。当我试图找到它时,我看到空值。 我试过: [[[CCDirector sharedDirector].runningScene getChildByTag:600] stopAction:repeat]; [[[[CCDirector sharedDirector].runningScene getChildByTag:

我在
ccmen
上有一个动作,它是
CCLayer
的一个孩子,他是
滚动条的孩子。(cocos2d的滚动层类)

ccmen
上正在运行一个操作,它有一个名称和一个标记

我就是停不下来。当我试图找到它时,我看到空值。 我试过:

[[[CCDirector sharedDirector].runningScene getChildByTag:600] stopAction:repeat];
[[[[CCDirector sharedDirector].runningScene getChildByTag:600]getChildByTag:800 ]stopAction:repeat];
[[[CCDirector sharedDirector].runningScene getChildByTag:600] stopAllActions];

[self stopAllActions];
没什么。 无法阻止这种行为。
如何停止我的
CCScene
中的所有操作?

您可以尝试执行以下操作:

//一,。为您的操作指定一个标记,例如:

id action = [CCRotateBy actionWithDuration:10.0f angle:90.0f];
[action setTag:1001];
运行操作:

[menu runAction:action];
当你想阻止它时,打电话

[menu stopActionByTag: 1001];

使用菜单名代替ccmenu


ccmenu->stopAllAction()

您只查看当前正在运行的场景的子场景,该场景将是其中一个层(滚动条?)。我认为您需要深入到节点层次结构中,以获得您的ccmen。据我所知,
getChildByTag:
只下到直接的子对象,而不是子对象的子对象。