From 07db9e416150d9ef89c5a45329fabb03e44bde8e Mon Sep 17 00:00:00 2001 From: knoxHuang <821686174@qq.com> Date: Thu, 25 Feb 2016 10:24:37 +0800 Subject: [PATCH] support cc.Blink action to ccNode --- cocos2d/actions/CCActionInterval.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos2d/actions/CCActionInterval.js b/cocos2d/actions/CCActionInterval.js index 11582362e1..9ea7ba47cb 100644 --- a/cocos2d/actions/CCActionInterval.js +++ b/cocos2d/actions/CCActionInterval.js @@ -1998,17 +1998,17 @@ cc.Blink = cc.ActionInterval.extend({ if (this.target && !this.isDone()) { var slice = 1.0 / this._times; var m = dt % slice; - this.target.visible = (m > (slice / 2)); + this.target.opacity = (m > (slice / 2)) ? 255 : 0; } }, startWithTarget:function (target) { cc.ActionInterval.prototype.startWithTarget.call(this, target); - this._originalState = target.visible; + this._originalState = target.opacity; }, stop:function () { - this.target.visible = this._originalState; + this.target.opacity = this._originalState; cc.ActionInterval.prototype.stop.call(this); },