cococ2d 进度条

    CCProgressTo* to=CCProgressTo::create(5.0f,100);

    CCProgressTimer* time=CCProgressTimer::create(CCSprite::create("s_hurt.png"));
    time->setPosition(ccp(size.width/2,size.height/2));
    addChild(time);

    time->setType(kCCProgressTimerTypeRadial);
    time->runAction(to);

    //加上这段代码,技能冷却的事件更完美
    CCSprite* sp=CCSprite::create("s_hurt.png");
    sp->setPosition(ccp(size.width/2,size.height/2));
    sp->setOpacity(100);
    addChild(sp);

 

posted @ 2014-04-03 08:40  yufenghou  阅读(177)  评论(0编辑  收藏  举报