CCOrbitCamera卡牌翻转效果

CCOrbitCamera卡牌翻转效果

 

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

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

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
//正面卡牌开始翻转
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)); 

  

  

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

CCOrbitCamera卡牌翻转效果

上一篇:一个很小很小的体会


下一篇:嵌入值和序列化LOB