当前位置: 首页>>代码示例>>C++>>正文


C++ CCProgressTo类代码示例

本文整理汇总了C++中CCProgressTo的典型用法代码示例。如果您正苦于以下问题:C++ CCProgressTo类的具体用法?C++ CCProgressTo怎么用?C++ CCProgressTo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CCProgressTo类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()));
}
开发者ID:DangoXJ,项目名称:TuJinZhi,代码行数:38,代码来源:ActionsProgressTest.cpp

示例2: CCProgressTo

CCProgressTo* CCProgressTo::create(float duration, float fPercent)
{
    CCProgressTo *pProgressTo = new CCProgressTo();
    pProgressTo->initWithDuration(duration, fPercent);
    pProgressTo->autorelease();

    return pProgressTo;
}
开发者ID:hbbalfred,项目名称:CCXWebview,代码行数:8,代码来源:CCActionProgressTimer.cpp

示例3: CCProgressTo

CCProgressTo* CCProgressTo::actionWithDuration(ccTime duration, float fPercent)
{
    CCProgressTo *pProgressTo = new CCProgressTo();
    pProgressTo->initWithDuration(duration, fPercent);
    pProgressTo->autorelease();

    return pProgressTo;
}
开发者ID:PashaCher,项目名称:cc-tetris,代码行数:8,代码来源:CCActionProgressTimer.cpp

示例4: CCProgressTo

NS_CC_BEGIN

// implementation of CCProgressTo

CCProgressTo* CCProgressTo::create(float duration, float fPercent)
{
    CCProgressTo *pProgressTo = new CCProgressTo();
    pProgressTo->initWithDuration(duration, fPercent);
    pProgressTo->autorelease();

    return pProgressTo;
}
开发者ID:IppClub,项目名称:Dorothy,代码行数:12,代码来源:CCActionProgressTimer.cpp

示例5: CCProgressTo

NS_CC_BEGIN

#define kProgressTimerCast CCProgressTimer*

// implementation of CCProgressTo
// 实现进度
CCProgressTo* CCProgressTo::create(float duration, float fPercent)
{
    CCProgressTo *pProgressTo = new CCProgressTo();
    pProgressTo->initWithDuration(duration, fPercent);
    pProgressTo->autorelease();

    return pProgressTo;
}
开发者ID:LaughingYan,项目名称:cocos2d-x,代码行数:14,代码来源:CCActionProgressTimer.cpp


注:本文中的CCProgressTo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。