Cocos2d-x进度条

		// 动画
		CCProgressTo* to1 = CCProgressTo::create(2, 100);
		// 进度条控件
		CCProgressTimer* progress = CCProgressTimer::create(CCSprite::create("f1.png"));
		// 进度条横向前进的方向是从左至右还是从右至左
		progress->setMidpoint(ccp(0, 1));
		// 进度条样式
		progress->setType(kCCProgressTimerTypeBar);
		// 进度条按横向还是纵向增长
		progress->setBarChangeRate(ccp(1, 0));
		progress->setPosition(ccp(progress->getContentSize().width / 2, s.height - progress->getContentSize().height / 2));
		this->addChild(progress);
		progress->runAction(CCRepeatForever::create(to1));

你可能感兴趣的:(cocos2d-x)