cocos2c-x技能cd

来源:互联网 发布:linux 网络服务器 编辑:程序博客网 时间:2024/05/16 09:25
Sprite *s2=CCSprite::create("dagger2.png");//pa2.png是较暗的图片  s2->setPosition(ccp(200,200));  addChild(s2,0);  Sprite *s=CCSprite::create("dagger1.png");//pa1.png是较亮的图片  ProgressTimer *pt=ProgressTimer::create(s);  pt->setPosition(ccp(200,200));  //转圈的CD实现  pt->setType(cocos2d::CCProgressTimerType(kCCProgressTimerTypeRadial));  //从中间到外的出现  //pt->setType(cocos2d::CCProgressTimerType(kCCProgressTimerTypeBar));  this->addChild(pt,1);  ProgressTo *t=ProgressTo::create(8,100);  pt->runAction(t);  

原创粉丝点击