public static Window fromXMLString(string str) { int x = HouseEditorObject.readXMLAttribInt(str, "x"); int y = HouseEditorObject.readXMLAttribInt(str, "y"); int width = HouseEditorObject.readXMLAttribInt(str, "width"); string idStr = HouseEditorObject.readXMLAttribStr(str, "type").Substring("OBJECT_".Length); int type = HouseEditorObject.idLookup(GlobalConstants.LOOKUP_OBJECT, GlobalConstants.LOOKUP_OBJECT.Length, idStr); return(new Window(x, y, width, type)); }
public static HouseObject fromXMLString(string str) { int x = HouseEditorObject.readXMLAttribInt(str, "x"); int y = HouseEditorObject.readXMLAttribInt(str, "y"); string idStr = HouseEditorObject.readXMLAttribStr(str, "type").Substring("OBJECT_".Length); int type = HouseEditorObject.idLookup(GlobalConstants.LOOKUP_OBJECT, GlobalConstants.LOOKUP_OBJECT.Length, idStr); int facingInt = HouseObject.getFacingInt(HouseEditorObject.readXMLAttribStr(str, "facingDir")); return(new HouseObject(x, y, type, facingInt)); }
public static Room fromXMLString(string str) { int x = HouseEditorObject.readXMLAttribInt(str, "x"); int y = HouseEditorObject.readXMLAttribInt(str, "y"); int width = HouseEditorObject.readXMLAttribInt(str, "width") + 1; int height = HouseEditorObject.readXMLAttribInt(str, "height") + 1; string idStr1 = HouseEditorObject.readXMLAttribStr(str, "floor").Substring("FLOOR_".Length); int floor = HouseEditorObject.idLookup(GlobalConstants.LOOKUP_FLOOR, GlobalConstants.LOOKUP_FLOOR.Length, idStr1); string idStr2 = HouseEditorObject.readXMLAttribStr(str, "wall").Substring("WALL_".Length); int wall = HouseEditorObject.idLookup(GlobalConstants.LOOKUP_WALL, GlobalConstants.LOOKUP_WALL.Length, idStr2); return(new Room(x, y, width, height, floor, wall)); }
public static int readXMLAttribInt(string str, string attrib) { return(Integer.parseInt(HouseEditorObject.readXMLAttribStr(str, attrib))); }