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); }