zoukankan      html  css  js  c++  java
  • 3.18 CCProgressTo 进度计时器

    CCProgressTimer * pross = CCProgressTimer::create(CCSprite::create("Icon.png"));
            pross->setPosition(ccp(100,180));
            //设置进度条的样式 扇形
    pross->setType( kCCProgressTimerTypeRadial); //设置进度值范围[0,100] pross->setPercentage(100); //反进度计时 pross->setReverseProgress(true); addChild(pross); CCProgressTo *to1 = CCProgressTo::create(2, 100); pross->runAction( CCRepeatForever::create(to1)); //一直循环 CCProgressTimer * prossR = CCProgressTimer::create(CCSprite::create("Icon.png")); prossR->setPosition(ccp(210,180));      //设置进度条的样式 条形
    prossR
    ->setType( kCCProgressTimerTypeBar ); //设置计时器运动方向
          /*
            ccp(0,y); 左 -> 右
            ccp(1,y); 右 -> 左
            ccp(x,0); 底部 -> 顶部
            ccp(x,1); 顶部 -> 底部
          */
    prossR->setMidpoint(ccp(0,1)); //设置计时器的宽高起始比例 ccp(1,1)起始计时器的宽高为0 ccp(0,0) 起始计时器的宽高为100%
         prossR->setBarChangeRate(ccp(0, 1)); addChild(prossR); CCProgressTo *to2 = CCProgressTo::create(2, 100); prossR->runAction( CCSequence::create(to2,NULL));//循环一次
  • 相关阅读:
    F. Xor-Paths 题解(折半搜索)
    Integers Have Friends 2.0 题解(随机+同余)
    3-爬虫框架-大规模异步并发爬虫
    2-爬虫框架-网址池的实现
    1-爬虫框架-download和MySQL封装
    [gym102220I]Temperature Survey
    [atAGC034F]RNG and XOR
    [luogu5564]Say Goodbye
    [cf1349D]Slime and Biscuits
    [bzoj3569]DZY Loves Chinese II
  • 原文地址:https://www.cnblogs.com/MrGreen/p/3458645.html
Copyright © 2011-2022 走看看