public static ObjItem LoadFromNode(Wz_Node node) { var item = new ObjItem() { OS = node.Nodes["oS"].GetValueEx <string>(null), L0 = node.Nodes["l0"].GetValueEx <string>(null), L1 = node.Nodes["l1"].GetValueEx <string>(null), L2 = node.Nodes["l2"].GetValueEx <string>(null), X = node.Nodes["x"].GetValueEx(0), Y = node.Nodes["y"].GetValueEx(0), Z = node.Nodes["z"].GetValueEx(0), Flip = node.Nodes["f"].GetValueEx(false), Tags = node.Nodes["tags"].GetValueEx <string>(null), }; return(item); }
public static ObjItem LoadFromNode(Wz_Node node) { var item = new ObjItem() { OS = node.Nodes["oS"].GetValueEx <string>(null), L0 = node.Nodes["l0"].GetValueEx <string>(null), L1 = node.Nodes["l1"].GetValueEx <string>(null), L2 = node.Nodes["l2"].GetValueEx <string>(null), X = node.Nodes["x"].GetValueEx(0), Y = node.Nodes["y"].GetValueEx(0), Z = node.Nodes["z"].GetValueEx(0), Flip = node.Nodes["f"].GetValueEx(false), }; string objTags = node.Nodes["tags"].GetValueEx <string>(null); if (!string.IsNullOrWhiteSpace(objTags)) { item.Tags = objTags.Split(',').Select(tag => tag.Trim()).ToArray(); } return(item); }