Fix cocos2d/cocos2d-html5#3156 setBlendFunc issue in parser

This commit is contained in:
pandamicro 2015-10-30 17:19:21 +08:00
parent 2dde476aa5
commit 246eab11a1
3 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@
handle: function(options){
var frame = new ccs.BlendFuncFrame();
var blendFunc = options["BlendFunc"];
if(blendFunc)
if(blendFunc && blendFunc["Src"] !== undefined && blendFunc["Dst"] !== undefined)
frame.setBlendFunc(new cc.BlendFunc(blendFunc["Src"], blendFunc["Dst"]));
return frame;
}

View File

@ -1311,7 +1311,7 @@
node.setDebugDrawLength(length);
var blendFunc = json["BlendFunc"];
if(blendFunc)
if(blendFunc && blendFunc["Src"] !== undefined && blendFunc["Dst"] !== undefined)
node.setBlendFunc(new cc.BlendFunc(blendFunc["Src"] || 0, blendFunc["Dst"] || 0));
parser.generalAttributes(node, json);

2
web

@ -1 +1 @@
Subproject commit c3ef2f2a28014089f6a8fc5b2fe1cd19ae67b0ad
Subproject commit 441aa2e47a0b347f7b16a16232a203e4d65a699f