private Topic loadTopicNode(XmlNode node) { Topic topic = new Topic(XmlUtil.Get(node, "id", string.Empty), XmlUtil.Get(node, "common", false)); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.Name == "label") { topic.label = childNode.InnerText; } if (childNode.Name == "questions") { foreach (XmlNode questionNode in childNode.ChildNodes) { topic.questions.Add(questionNode.InnerText); } } if (childNode.Name == "default") { topic.defaultEvent = NeverdawnUtility.LoadEvent(childNode.FirstChild); } } return(topic); }
private void loadEvents() { events = new Dictionary <string, NeverdawnEventBase>(); XmlDocument doc = NeverdawnScene.sceneEventsXml; XmlNodeList list = doc.GetElementsByTagName("events"); if (list != null) { XmlNode eventsNode = list[0]; if (eventsNode != null) { foreach (XmlNode node in eventsNode.ChildNodes) { NeverdawnEventBase eventBase = NeverdawnUtility.LoadEvent(node); events.Add(eventBase.id, eventBase); } } } }