Cocos2d iphone Cocos2d和grid3d-操作完成后重置效果

Cocos2d iphone Cocos2d和grid3d-操作完成后重置效果,cocos2d-iphone,effects,Cocos2d Iphone,Effects,我只是想弄明白这一点,我有一个grid3d CCRipple3D动作/效果,它出现在它应该出现的地方。除非完成(1秒后),否则会“暂停”效果并将其保留在原位。我只想要一个涟漪,然后它消失。这是我的代码: for( UITouch *touch in touches ) { CGPoint location = [touch locationInView: [touch view]]; location = [[CCDirector sharedDirector] conver

我只是想弄明白这一点,我有一个grid3d CCRipple3D动作/效果,它出现在它应该出现的地方。除非完成(1秒后),否则会“暂停”效果并将其保留在原位。我只想要一个涟漪,然后它消失。这是我的代码:

for( UITouch *touch in touches ) {

    CGPoint location = [touch locationInView: [touch view]];

    location = [[CCDirector sharedDirector] convertToGL: location];

    id effect = [CCRipple3D actionWithPosition:location radius:180 waves:10 amplitude:20 grid:ccg(60, 60) duration:1]; 

    [self runAction:effect];
}
但这会在该位置的图层上留下扭曲。我需要它纹波一秒钟然后消失

提前谢谢

id effect = [CCRipple3D actionWithPosition:location radius:180 waves:10 amplitude:20 grid:ccg(60, 60) duration:1];
[someNode runAction:[CCSequence actions:effect,[CCStopGrid action], nil]];
如果是较旧版本的cocos2d,请使用[StopGrid action]而不是[CCStopGrid action]


也许,OP早就找到了答案。但是仍然发布解决方案,这样任何人都可以找到到达这里的答案(就像我一样)。

我在使用cocos2d js 3.0时也遇到了这个问题。多亏了梅斯巴的回答,我得到了:

    var action = cc.shaky3D(3, cc.size(15, 10), 50, false);
    gameBg.runAction( cc.sequence(action, cc.stopGrid()) );

谢谢,我还没有找到答案,真的很感激!我只是保留了它结束时的效果,但现在我可以返回并更新它。谢谢