浏览代码

Fixed reading inherit scale and rotation.

NathanSweet 11 年之前
父节点
当前提交
b0da7d0e52
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      spine-as3/spine-as3/src/spine/SkeletonJson.as

+ 2 - 2
spine-as3/spine-as3/src/spine/SkeletonJson.as

@@ -99,8 +99,8 @@ public class SkeletonJson {
 			boneData.rotation = (boneMap["rotation"] || 0);
 			boneData.scaleX = boneMap.hasOwnProperty("scaleX") ? boneMap["scaleX"] : 1;
 			boneData.scaleY = boneMap.hasOwnProperty("scaleY") ? boneMap["scaleY"] : 1;
-			boneData.inheritScale = !boneMap["inheritScale"] || boneMap["inheritScale"] == "true";
-			boneData.inheritRotation = !boneMap["inheritRotation"] || boneMap["inheritRotation"] == "true";
+			boneData.inheritScale = boneMap.hasOwnProperty("inheritScale") ? boneMap["inheritScale"] : true;
+			boneData.inheritRotation = boneMap.hasOwnProperty("inheritRotation") ? boneMap["inheritRotation"] : true;
 			skeletonData.addBone(boneData);
 		}