首页 > 代码库 > cocos2dx2.2.3重要学习笔记
cocos2dx2.2.3重要学习笔记
(1) runActionDelay(1,CCFadeOut::create(CCRANDOM_0_1()*0.3f+0.2f));比如这个
等价成:
CCDelayTime * delayAction = CCDelayTime::create( 1 );
CCFadeOut * outAction = CCFadeOut::create(CCRANDOM_0_1()*0.3f+0.2f);
pStar1->runAction(CCSequence::create(delayAction, outAction, NULL));
pStar1->runAction(CCSequence::create(delayAction, outAction, NULL));
pStar1->runActionDelay(1.2f,CCRepeatForever::create(CCSequence::createWithTwoActions(
CCFadeIn::create(1.0f),CCFadeOut::create(1.5f))));
CCFadeIn::create(1.0f),CCFadeOut::create(1.5f))));
等价成
pStar1->runAction(CCDelayTime::create(1.2f));
pStar1->runAction(CCRepeatForever::create(CCSequence::createWithTwoActions(
CCFadeIn::create(1.0f),CCFadeOut::create(1.5f)));
pStar1->runAction(CCRepeatForever::create(CCSequence::createWithTwoActions(
CCFadeIn::create(1.0f),CCFadeOut::create(1.5f)));
(3)
pLabelView->runActionDelay(timeDelay,CCSequence::create(
CCShow::create(),
CCMoveTo::create(0.5f+time,ptEnd),
CCCallFuncO::create(this,callfuncO_selector(GameLayer::onAddPoint),CCInteger::create(stepValue)),
NULL),true);
CCShow::create(),
CCMoveTo::create(0.5f+time,ptEnd),
CCCallFuncO::create(this,callfuncO_selector(GameLayer::onAddPoint),CCInteger::create(stepValue)),
NULL),true);
等价成
pLabelView->runAction(CCDelayTime::create(timeDelay));
pLabelView->runAction(CCSequence::create(
CCShow::create(),
CCMoveTo::create(0.5f + time, ptEnd),
CCCallFuncO::create(this, callfuncO_selector(GameLayer::onAddPoint), CCInteger::create(stepValue)),
NULL));
pLabelView->runAction(CCSequence::create(
CCShow::create(),
CCMoveTo::create(0.5f + time, ptEnd),
CCCallFuncO::create(this, callfuncO_selector(GameLayer::onAddPoint), CCInteger::create(stepValue)),
NULL));
(4)
cocos2dx2.2.3重要学习笔记
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。