CCSize size = CCDirector::sharedDirector()->getWinSize(); CCSprite * sp = CCSprite::create("guang.png"); sp->setPosition(ccp(sp->getContentSize().width / 2,size.height/2)); addChild(sp); //1.指数缓冲 //1.1 CCEaseExponentialIn //CCEaseExponentialIn *exponentialIn = CCEaseExponentialIn::create(CCMov
eto::create(3.0f,ccp(size.width - sp->getContentSize().width / 2,size.height / 2))); //sp->runAction(exponentialIn); //1.2 CCEaseExponentialInOut //CCEaseExponentialInOut *exponentialInOut = CCEaseExponentialInOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(exponentialInOut); //1.3 CCEaseExponentialOut //CCEaseExponentialOut *exponentialOut = CCEaseExponentialOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(exponentialOut); //2.Sine缓冲 //2.1 CCEaseSineIn //CCEaseSineIn *sineIn = CCEaseSineIn::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(sineIn); //2.2 CCEaseSineInOut //CCEaseSineInOut *sineInOut = CCEaseSineInOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(sineInOut); //2.3 CCEaseSineOut //CCEaseSineOut *sineOut = CCEaseSineOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(sineOut); //3.弹性缓冲 //static CCEaseElasticInOut* create(CCActionInterval *pAction,float fPeriod);//fPeriod是弧度的周期,
默认是0.3 //static CCEaseElasticInOut* create(CCActionInterval *pAction); //3.1 CCEaseElastic //CCEaseElastic *elastic = CCEaseElastic::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(elastic); //3.2 CCEaseElasticIn //CCEaseElasticIn *elasticIn = CCEaseElasticIn::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(elasticIn); //3.3 CCEaseElasticInOut //CCEaseElasticInOut *elasticInOut = CCEaseElasticInOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(elasticInOut); //3.4 CCEaseElasticOut //*** //CCEaseElasticOut *elasticOut = CCEaseElasticOut::create(CCMov
eto::create(5.0f,size.height / 2))); //sp->runAction(elasticOut); //4.跳跃缓冲 //4.1 CCEaseBounce //CCEaseBounce *bounce = CCEaseBounce::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(bounce); //4.2 CCEaseBounceIn //CCEaseBounceIn *bounceIn = CCEaseBounceIn::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(bounceIn); //4.3 CCEaseBounceInOut //CCEaseBounceInOut *bounceInOut = CCEaseBounceInOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(bounceInOut); //4.4 CCEaseBounceOut //********** CCEaseBounceOut *bounceOut = CCEaseBounceOut::create(CCMov
eto::create(3.0f,size.height / 2))); sp->runAction(bounceOut); //5.回震缓冲 //5.1 CCEaseBackIn //CCEaseBackIn *backIn = CCEaseBackIn::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(backIn); //5.2 CCEaseBackOut //CCEaseBackOut *backOut = CCEaseBackOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(backOut); //5.3 CCEaseBackInOut //CCEaseBackInOut *backInOut = CCEaseBackInOut::create(CCMov
eto::create(3.0f,size.height / 2))); //sp->runAction(backInOut);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。