Skip to content

Commit 34b9c0e

Browse files
committed
Merge pull request cocos2d#1268 from rablwupei/fix_progressTimer
fix bug: ProgressTime can't change color and opacity
2 parents 9762d05 + 7897842 commit 34b9c0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cocos2d/misc_nodes/CCProgressTimer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ cc.ProgressTimer = cc.NodeRGBA.extend(/** @lends cc.ProgressTimer# */{
220220
*/
221221
setColor:function (color) {
222222
this._sprite.setColor(color);
223+
this._updateColor();
223224
},
224225

225226
/**
@@ -228,6 +229,7 @@ cc.ProgressTimer = cc.NodeRGBA.extend(/** @lends cc.ProgressTimer# */{
228229
*/
229230
setOpacity:function (opacity) {
230231
this._sprite.setOpacity(opacity);
232+
this._updateColor();
231233
},
232234

233235
/**
@@ -881,7 +883,6 @@ cc.ProgressTimer = cc.NodeRGBA.extend(/** @lends cc.ProgressTimer# */{
881883
this._updateRadial();
882884
else if(locType === cc.PROGRESS_TIMER_TYPE_BAR)
883885
this._updateBar();
884-
this._updateColor();
885886
this._vertexDataDirty = true;
886887
}
887888
});

0 commit comments

Comments
 (0)