CCOrbitCamera卡牌翻转效果

时间:2022-10-28 16:55:22

CCOrbitCamera卡牌翻转效果

static CCOrbitCamera* create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX);

旋转的时间,起始半径,半径差,起始z角,旋转z角差,起始x角,旋转x角差

	//正面卡牌开始翻转
BaseSprite *openedCard = (BaseSprite*)cardItem->getChildByTag(Tag_CardOpened);
openedCard->runAction(CCSequence::create(
CCDelayTime::create(OPEN_CARD_TIME * .5),
CCShow::create(),
CCOrbitCamera::create(OPEN_CARD_TIME * .5, 1, 0, 270, 90, 0, 0),
NULL));
//背面卡牌开始翻转
BaseSprite *closedCard = (BaseSprite*)cardItem->getChildByTag(Tag_CardClosed);
closedCard->runAction(CCSequence::create(
CCOrbitCamera::create(OPEN_CARD_TIME * .5, 1, 0, 0, 90, 0, 0),
CCHide::create(),
CCDelayTime::create(OPEN_CARD_TIME * .5),
NULL));

  

  

————————此人很懒。。。。。。。