Merge pull request #376 from knoxHuang/master

support  cc.Blink action to ccNode
This commit is contained in:
pandamicro
2016-02-25 10:30:40 +08:00
+3 -3
View File
@@ -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);
},