码迷,mamicode.com
首页 > 其他好文 > 详细

cocos2dx 翻牌效果

时间:2015-10-10 12:16:03      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:

CCSprite *sp = CCSprite::create("");
addChild(sp,0);
sp->setPosition(ccp(s.width / 2, s.height / 2));

CCSprite *sprite,*sprite2;
CCOrbitCamera *orbit,*orbit2;
CCActionInterval *seq,*seq2;

sprite = CCSprite::create("Images/back.png");
sp->addChild(sprite, 0);
sprite->setPosition(ccp(0, 0));
orbit = CCOrbitCamera::create(1, 1, 0, 0, 90, 0, 0);
seq = CCSequence::create(CCShow::create(), orbit, CCHide::create(), CCDelayTime::create(1), NULL);
sprite->runAction(seq);

sprite2 = CCSprite::create("Images/card.png");
sp->addChild(sprite2, 0);
sprite2->setPosition(ccp(0, 0));
orbit2 = CCOrbitCamera::create(1, 1, 0, 270, 90, 0, 0);
seq2 = CCSequence::create(CCHide::create(), CCDelayTime::create(1), CCShow::create(),orbit2, NULL);
sprite2->runAction(seq2);

 

cocos2dx 翻牌效果

标签:

原文地址:http://www.cnblogs.com/jevil/p/4866345.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!