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)); 

 

(2)

 pStar1->runActionDelay(1.2f,CCRepeatForever::create(CCSequence::createWithTwoActions(
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)));

 

(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); 

等价成

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));

 

不懂的可以关注我的公众号,里面有你想要的(有问题公众号留言必回答)https://mp.weixin.qq.com/s?__biz=MzIyOTM4MDMxNw==&mid=2247483836&idx=2&sn=1e1d922b5f2511e550da712921992d32&chksm=e842d80edf35511810bc8e383992c2e6a38665e466328200265386ab16fc4601d4822badf546&token=573588601&lang=zh_CN#rd

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值