From 239fc02d4681a0dfd715cde080897273379328a2 Mon Sep 17 00:00:00 2001 From: xingsenma Date: Wed, 11 Dec 2013 15:28:40 +0800 Subject: [PATCH] closed #3377: fix a bug that _displayedColor and _realColor use the same Pointer when compile single js file --- cocos2d/base_nodes/CCAtlasNode.js | 2 +- cocos2d/base_nodes/CCNode.js | 4 ++-- cocos2d/platform/CCTypes.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos2d/base_nodes/CCAtlasNode.js b/cocos2d/base_nodes/CCAtlasNode.js index ef014c67b0..c625d3a761 100644 --- a/cocos2d/base_nodes/CCAtlasNode.js +++ b/cocos2d/base_nodes/CCAtlasNode.js @@ -193,7 +193,7 @@ cc.AtlasNode = cc.NodeRGBA.extend(/** @lends cc.AtlasNode# */{ _initWithTextureForWebGL:function(texture, tileWidth, tileHeight, itemsToRender){ this._itemWidth = tileWidth; this._itemHeight = tileHeight; - this._colorUnmodified = cc.WHITE; + this._colorUnmodified = cc.white(); this._opacityModifyRGB = true; this._blendFunc.src = cc.BLEND_SRC; diff --git a/cocos2d/base_nodes/CCNode.js b/cocos2d/base_nodes/CCNode.js index 612d01a47f..feb014cf48 100644 --- a/cocos2d/base_nodes/CCNode.js +++ b/cocos2d/base_nodes/CCNode.js @@ -2153,8 +2153,8 @@ cc.NodeRGBA = cc.Node.extend(/** @lends cc.NodeRGBA# */{ cc.Node.prototype.ctor.call(this); this._displayedOpacity = 255; this._realOpacity = 255; - this._displayedColor = cc.WHITE; - this._realColor = cc.WHITE; + this._displayedColor = cc.white(); + this._realColor = cc.white(); this._cascadeColorEnabled = false; this._cascadeOpacityEnabled = false; }, diff --git a/cocos2d/platform/CCTypes.js b/cocos2d/platform/CCTypes.js index 8ab9dff686..e166066d89 100644 --- a/cocos2d/platform/CCTypes.js +++ b/cocos2d/platform/CCTypes.js @@ -1382,11 +1382,11 @@ cc.FontDefinition = function(){ this.fontSize = 12; this.fontAlignmentH = cc.TEXT_ALIGNMENT_CENTER; this.fontAlignmentV = cc.VERTICAL_TEXT_ALIGNMENT_TOP; - this.fontFillColor = cc.WHITE; + this.fontFillColor = cc.white(); this.fontDimensions = cc.size(0,0); this.strokeEnabled = false; - this.strokeColor = cc.WHITE; + this.strokeColor = cc.white(); this.strokeSize = 1; this.shadowEnabled = false;