cocos2d-js 小笔记

来源:互联网 发布:android相册开发源码 编辑:程序博客网 时间:2024/05/16 11:09

       this.spriteTwo = new cc.Sprite("#openclose3.png");      

       var to1 = new cc.ProgressTo(1, 80);  //定义好经历的时间和百分比

        var left = new cc.ProgressTimer( this.spriteTwo );

        left.type = cc.ProgressTimer.TYPE_BAR;  // 样式
        left.midPoint = cc.p(0, 0);
        left.barChangeRate = cc.p(1, 0);
        left.setPosition(cc.p(x, y));  //坐标
        this.addChild(left);        //添加
        left.runAction(to1); //执行动作
0 0
原创粉丝点击