// 技能CD var progressBox2 = cc.Sprite.createWithSpriteFrameName("ui_progress3.png"); progressBox2.setAnchorPoint(AnchorPointBottom); var progress2_xPos = winSize.width - 20; var progress2_yPos = winSize.height/2; progressBox2.setPosition(progress2_xPos, progress2_yPos); this.addChild(progressBox2, g_GameZOder.ui); this.lbProgress2 = cc.Sprite.createWithSpriteFrameName("ui_progress4.png"); this.lbProgress2.setAnchorPoint(AnchorPointBottom); this.lbProgress2.setPosition(progress2_xPos, progress2_yPos); this.addChild(this.lbProgress2, g_GameZOder.ui);
if (this._cd < this._ship.skillCd) { this._cd ++; if (this._cd == this._ship.skillCd) { // 播放CD结束动画
// this.skill_up.runAction(cc.TintBy.create(0.1,0,-255,-255).reverse());
var animation = cc.AnimationCache.getInstance().getAnimation(this._ship.skillIcon);
animation.setRestoreOriginalFrame(true);
var animate = cc.Animate.create(animation);
var animate2 = animate.reverse();
this.skill_up.runAction(cc.Sequence.create(animate, animate2));
} } else { this._cd = this._ship.skillCd; } this.lbProgress2.setScaleY(this._cd / this._ship.skillCd);