Commits

David Erosa committed 5ebba91

Remove unused code and some formatting

  • Participants
  • Parent commits 21e2cbe

Comments (0)

Files changed (1)

 					currentLayerID++;
 				break;
 			case "objectgroup":
-				Debug.Log ("New objectgroup!");
-				if (outerNode.Attributes ["name"].InnerText.IndexOf ("Collisions") != -1) {
-					Debug.Log ("Collisions group found");
+				if (outerNode.Attributes ["name"].InnerText.IndexOf ("CollisionObjects") != -1) {
 					foreach (XmlNode objectNode in outerNode.ChildNodes) {
-						if (outerNode.SelectSingleNode ("object") == null) {
-							
-						}
-						//int layerWidth = int.Parse (outerNode.Attributes ["width"].InnerText);
-						//int layerHeight = int.Parse (outerNode.Attributes ["height"].InnerText);
 						int colliderWidth = 0;
 						int colliderHeight = 0;
+						
 						if (objectNode.Attributes.GetNamedItem ("width") != null) {
 							colliderWidth = int.Parse (objectNode.Attributes ["width"].InnerText);
 							colliderHeight = int.Parse (objectNode.Attributes ["height"].InnerText);	
 						}
-
+						
 						int colliderX = int.Parse (objectNode.Attributes ["x"].InnerText);
 						int colliderY = int.Parse (objectNode.Attributes ["y"].InnerText);
-
 						colliderX += (colliderWidth / 2 + 16); 
 						colliderY = - (colliderY + colliderHeight / 2);
+						
 						GameObject newCollider = null;
 						
 						if (objectNode.HasChildNodes) {
-							// Can be polyline, ellipse or polygon
+							// Can be polyline, ellipse or polygon, as boxes have no child.
 							string objectType = objectNode.FirstChild.Name;
 							Debug.Log ("Has children: " + objectType);
 							switch (objectType) {