cocos2c-x技能cd

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);  

你可能感兴趣的:(cocos2c-x技能cd)