private void baseLoadXml(XmlDocument x) { foreach (XmlNode n in x.DocumentElement.ChildNodes) { string val = n.InnerText.Trim(); switch (n.Name) { case "base": BasePath = val; LoadXmlDoc(StaticResources.GetXml(Path.Combine(TypePath, val))); break; case "rate": Rate = Convert.ToSingle(val); break; } } LoadXmlDoc(x); }
public GameObject(string basePath) { BasePath = basePath; baseLoadXml(StaticResources.GetXml(Path.Combine(TypePath, basePath))); }