mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13194 from VisualSJ/v3-boneTest
[ci skip] Update JSON parser
This commit is contained in:
commit
744fa0b565
|
@ -113,7 +113,7 @@
|
|||
name: "Rotation",
|
||||
handle: function(options){
|
||||
var frame = new ccs.RotationFrame();
|
||||
var rotation = options["Rotation"];
|
||||
var rotation = options["Rotation"] || options["Value"] || 0;
|
||||
frame.setRotation(rotation);
|
||||
return frame;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,9 @@
|
|||
var visible = getParam(json["VisibleForFrame"], true);
|
||||
node.setVisible(visible);
|
||||
|
||||
setContentSize(node, json["Size"]);
|
||||
var size = json["Size"];
|
||||
if(size)
|
||||
setContentSize(node, size);
|
||||
|
||||
if (json["Alpha"] != null)
|
||||
node.setOpacity(json["Alpha"]);
|
||||
|
@ -118,9 +120,7 @@
|
|||
extensionData.setCustomProperty(customProperty);
|
||||
extensionData.setActionTag(actionTag);
|
||||
if (node.getComponent("ComExtensionData"))
|
||||
{
|
||||
node.removeComponent("ComExtensionData");
|
||||
}
|
||||
node.addComponent(extensionData);
|
||||
|
||||
node.setCascadeColorEnabled(true);
|
||||
|
@ -294,9 +294,7 @@
|
|||
extensionData.setCustomProperty(customProperty);
|
||||
extensionData.setActionTag(actionTag);
|
||||
if (widget.getComponent("ComExtensionData"))
|
||||
{
|
||||
widget.removeComponent("ComExtensionData");
|
||||
}
|
||||
widget.addComponent(extensionData);
|
||||
|
||||
var rotationSkewX = json["RotationSkewX"];
|
||||
|
|
Loading…
Reference in New Issue