Selaa lähdekoodia

Fixed reading ints.

NathanSweet 12 vuotta sitten
vanhempi
commit
58545382fc
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      spine-csharp/src/SkeletonJson.cs
  2. 1 1
      spine-xna/example/data/spineboy.json

+ 1 - 1
spine-csharp/src/SkeletonJson.cs

@@ -228,7 +228,7 @@ namespace Spine {
 		private int GetInt (Dictionary<String, Object> map, String name, int defaultValue) {
 			if (!map.ContainsKey(name))
 				return defaultValue;
-			return (int)map[name];
+			return (int)(float)map[name];
 		}
 
 		private bool GetBoolean (Dictionary<String, Object> map, String name, bool defaultValue) {

+ 1 - 1
spine-xna/example/data/spineboy.json

@@ -119,7 +119,7 @@
 	}
 },
 "events": {
-	"behind": {},
+	"behind": { "int": 4 },
 	"headAttach": {},
 	"headPop": {}
 },