재사용 대기 시간 버튼 (2)

3561 단어
onSkillShade:function () {
        if (!this.lbSkillShade) {
            //  
            var progress2 = cc.Sprite.createWithSpriteFrameName("ui_skill_shade.png");
            this.lbSkillShade = cc.ProgressTimer.create(progress2);
            this.lbSkillShade.setType(cc.PROGRESS_TIMER_TYPE_RADIAL);
            this.lbSkillShade.setReverseDirection(true);
            this.lbSkillShade.setPosition(900,60);
            this.addChild(this.lbSkillShade, g_GameZOder.ui+1);
        }
        this.lbSkillShade.setVisible(true);
        //
        var to = cc.ProgressTo.create(0, 99.999);
        var to1 = cc.ProgressTo.create(this._ship.skillCd, 0);
        var fun = cc.CallFunc.create(
            function () {
                //  
                this.lbSkillShade.setVisible(false);
                //  
                    var animation = cc.AnimationCache.getInstance().getAnimation(this._ship.skillIcon);
                    var animate = cc.Animate.create(animation);
                    var animate2 = animate.reverse();
                    this.skill_up.runAction(cc.Sequence.create(animate, animate2));
            }
            , this);
        var ac = cc.Sequence.create(to, to1, fun);
        this.lbSkillShade.runAction(ac);
    }

좋은 웹페이지 즐겨찾기