Skip to content

Commit 6315510

Browse files
committed
Merge pull request cocos2d#2443 from VisualSJ/revert-2442-develop-setColor
Revert "Fixed a bug that sprite update color terminated unexpectedly"
2 parents 3cba083 + 70752dd commit 6315510

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cocos2d/core/sprites/CCSprite.js

+4
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,10 @@ if (cc._renderType === cc._RENDER_TYPE_CANVAS) {
14911491
_p.updateDisplayedColor = function (parentColor) {
14921492
var _t = this;
14931493
cc.Node.prototype.updateDisplayedColor.call(_t, parentColor);
1494+
var oColor = _t._oldDisplayColor;
1495+
var nColor = _t._displayedColor;
1496+
if (oColor.r === nColor.r && oColor.g === nColor.g && oColor.b === nColor.b)
1497+
return;
14941498

14951499
_t._changeTextureColor();
14961500
_t._setNodeDirtyForCache();

0 commit comments

Comments
 (0)