CCProgressTimer *p_SpTime = CCProgressTimer::create(CCSprite::createWithSpriteFrameName("IM_Progress.png"));
p_SpTime->setType(kCCProgressTimerTypeBar);
// 水平 ccp(1,0)右到左 ccp(0,1)左到右 ccp(0, 0) 默认左到右
// 垂直 ccp(1,0)下到上 ccp(0,1)上到下? ccp(0, 0) 默认下到上
p_SpTime->setMidpoint(ccp(1,0));
p_SpTime->setAnchorPoint(ccp(0.0f,0.5f));
p_SpTime->setBarChangeRate(ccp(0, 1));////ccp(1,0) 水平方向 ccp(0, 1)垂直方向 ccp(0,0) 加载满不加载
p_SpTime->setPosition(ccp(size.width / 2, size.height / 2));
p_SpTime->setPercentage(0.0f);//初始加载 100满
addChild(p_SpTime);
时间: 2024-11-18 13:46:01