cocos2d-x CClayer and CCNode SetFipX or Y ?

1This problem is solved with empty sprite image, I am adding all objects , as a children's of that empty sprite, that sprite is child of cclayer .so i am simply using sprite->setscaleX(-1.0f);

it works very well.thanks for all who guid me.

2

You can use CCOrbitCamera. I am using it in one of my game. I am using it in two parts so two commands are there otherwise one command is suffice to make the flip effect. Just play around with it.

CCActionInterval *firstHalf = CCOrbitCamera::create(d/2, 1, 0, 0, 90, 0, 0);
CCActionInterval *secondHalf = CCOrbitCamera::create(d/2, 1, 0, 270, 90, 0, 0);

node->runAction(CCSequence::create(firstHalf, changeDisplayFrame, secondHalf, NULL));

3 if isnode then  just do setScaleX(-1)  or setScaleY(-1)   using spine skeletonNode ,this is a good way!

你可能感兴趣的:(cocos2d-x CClayer and CCNode SetFipX or Y ?)