Skip to content

Instantly share code, notes, and snippets.

@judeibe
Created March 15, 2011 22:28
Show Gist options
  • Select an option

  • Save judeibe/871643 to your computer and use it in GitHub Desktop.

Select an option

Save judeibe/871643 to your computer and use it in GitHub Desktop.
if ("objectgroup".equals(qName) | "objectgroup".equals(name)) {
currentObjectGroup = new TiledObjectGroup();
currentObjectGroup.name = attr.getValue("name");
currentObjectGroup.height = Integer.parseInt(attr.getValue("height"));
currentObjectGroup.width = Integer.parseInt(attr.getValue("width"));
return;
}
if ("object".equals(qName) | "object".equals(name)) {
currentObject = new TiledObject();
currentObject.name = attr.getValue("name");
currentObject.type = attr.getValue("type");
currentObject.x = Integer.parseInt(attr.getValue("x"));
currentObject.y = Integer.parseInt(attr.getValue("y"));
currentObject.width = parseIntWithDefault(attr.getValue("width"), 0);
currentObject.height = parseIntWithDefault(attr.getValue("height"), 0);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment