我正在尝试将 ccWave 操作应用于我的代码。但是此操作适用于整个屏幕。我只想将此动作应用于精灵。这是我的代码
id waves = [CCWaves actionWithWaves:5 amplitude:50 horizontal:YES vertical:NO grid:ccg(15,10) duration:5];
[sprite runAction: [CCRepeatForever actionWithAction: waves]];
我正在尝试将 ccWave 操作应用于我的代码。但是此操作适用于整个屏幕。我只想将此动作应用于精灵。这是我的代码
id waves = [CCWaves actionWithWaves:5 amplitude:50 horizontal:YES vertical:NO grid:ccg(15,10) duration:5];
[sprite runAction: [CCRepeatForever actionWithAction: waves]];