本文整理汇总了C++中CCProgressTo::copy方法的典型用法代码示例。如果您正苦于以下问题:C++ CCProgressTo::copy方法的具体用法?C++ CCProgressTo::copy怎么用?C++ CCProgressTo::copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCProgressTo
的用法示例。
在下文中一共展示了CCProgressTo::copy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onEnter
//------------------------------------------------------------------
//
// SpriteProgressToRadialMidpointChanged
//
//------------------------------------------------------------------
void SpriteProgressToRadialMidpointChanged::onEnter()
{
SpriteDemo::onEnter();
CCSize s = CCDirector::sharedDirector()->getWinSize();
CCProgressTo *action = CCProgressTo::create(2, 100);
/**
* Our image on the left should be a radial progress indicator, clockwise
*/
CCProgressTimer *left = CCProgressTimer::create(CCSprite::create(s_pPathBlock));
left->setType(kCCProgressTimerTypeRadial);
addChild(left);
left->setMidpoint(ccp(0.25f, 0.75f));
left->setPosition(ccp(100, s.height/2));
left->runAction(CCRepeatForever::create((CCActionInterval *)action->copy()->autorelease()));
/**
* Our image on the left should be a radial progress indicator, counter clockwise
*/
CCProgressTimer *right = CCProgressTimer::create(CCSprite::create(s_pPathBlock));
right->setType(kCCProgressTimerTypeRadial);
right->setMidpoint(ccp(0.75f, 0.25f));
/**
* Note the reverse property (default=NO) is only added to the right image. That's how
* we get a counter clockwise progress.
*/
addChild(right);
right->setPosition(ccp(s.width-100, s.height/2));
right->runAction(CCRepeatForever::create((CCActionInterval *)action->copy()->autorelease()));
}