OSDN Git Service

Fix loading MapProperties from tmx file.
authorJustin Shapcott <support@mobidevelop.com>
Sun, 24 Feb 2013 04:35:37 +0000 (21:35 -0700)
committerJustin Shapcott <support@mobidevelop.com>
Sun, 24 Feb 2013 04:35:37 +0000 (21:35 -0700)
gdx/src/com/badlogic/gdx/maps/tiled/TmxMapLoader.java

index 926da82..71a5114 100644 (file)
@@ -529,7 +529,7 @@ public class TmxMapLoader extends SynchronousAssetLoader<TiledMap, TmxMapLoader.
                if (element.getName().equals("properties")) {
                        for (Element property : element.getChildrenByName("property")) {
                                String name = property.getAttribute("name", null);
-                               String value = property.getAttribute(name, null);
+                               String value = property.getAttribute("value", null);
                                if (value == null) {
                                        value = property.getText();
                                }