Strange behavior on test.ios EffectAdvancedTest

Strange behavior on test.ios EffectAdvancedTest
0.0 0


We want to use CCWaves in our game so we looked into test.ios EffectAdvancedTest

On Effects on 2 sprites stage, we just get one shaky sprite only.

Below is the sampe code:


CCNode* bg = getChildByTag(kTagBackground);
CCNode* target1 = bg~~>getChildByTag;
CCNode* target2 = bg~~>getChildByTag(kTagSprite2);

CCActionInterval* waves = c::actionWithWaves(5, 20, true, false, ccg(15,10), 5);
CCActionInterval* shaky = CCShaky3D::actionWithRange(4, false, ccg(15,10), 5);

target1~~>runAction );
target2~~>runAction( CCRepeatForever::actionWithAction( shaky ) );

// moving background. Testing issue #244
CCActionInterval* move = CCMoveBy::actionWithDuration(3, ccp(200,0) );
bg->runAction(CCRepeatForever::actionWithAction( (CCActionInterval *)(CCSequence::actions(move, move->reverse(), NULL) ) ) );

We comment “target2~~>runAction );" line, and we can see one wave sprite and one still sprite but not background.
We comment "target1~~>runAction( CCRepeatForever::actionWithAction( waves ) );” line, we can see background and two still sprites.
It seems this action(shaky,waves) can only apply on full screen, not on sprite with alpha.

Is this right?


yep, it depends on the opengles based implementation of these effects.