public static void SetUpdaterAddress(TextAsset text) { if (text == null) { return; } XMLParser xMLParser = new XMLParser(); XMLNode xMLNode = xMLParser.Parse(text.text); XMLNodeList nodeList = xMLNode.GetNodeList("Addresses>0>Address"); if (nodeList != null) { foreach (XMLNode xMLNode2 in nodeList) { Config.GameAddress gameAddress = new Config.GameAddress(); gameAddress.strID = xMLNode2.GetValue("@ID"); gameAddress.strName = xMLNode2.GetValue("@Name"); gameAddress.strDomainAddress = xMLNode2.GetValue("@DomainAddr") + "/" + Config.GetInstallationVersion(); gameAddress.strIPAddress = xMLNode2.GetValue("@IPAddr") + "/" + Config.GetInstallationVersion(); if (!Config.mUpdaterAddress.ContainsKey(gameAddress.strID)) { Config.mUpdaterAddress.Add(gameAddress.strID, gameAddress); } } } }
private void LoadConfigFile() { Config.GameAddress updaterAddress = Config.GetUpdaterAddress(); string text = string.Empty; if (updaterAddress != null) { text = updaterAddress.strDomainAddress; } text += "/Config/Config_Android.xml"; LogSystem.LogWarning(new object[] { this.ToString(), text }); Instance.Get <WebStreamLoader>().ReadStream(text, new WebStreamLoader.OnWebReqCallBack(this.OnConfigLoadCallback)); }