public void Setup(GameSetup.LevelList _set, bool _isLocked) { nameLv = _set; Locked = _isLocked; if (nameLv != GameSetup.LevelList.None) { Info = Instantiate(Resources.Load("Tuning/Levels/" + nameLv.ToString())) as LevelInfo; } gameObject.name = _set.ToString(); Locker = FETool.findWithinChildren(gameObject, "Lock").GetComponentInChildren<OTSprite>(); if (Locked == true) { Locker.alpha = 1f; } else { Locker.alpha = 0f; } linkedPlayBtn = GetComponentInChildren<MiscButton>(); }
private Dictionary<string, string> fillDicoText(GameSetup.languageList _lang) { Doc = new XmlDocument(); // Debug.Log("Loading" +_lang.ToString()); Doc.LoadXml(dialog_file.text); Dictionary<string, string> translate = new Dictionary<string, string>(); XmlNodeList TextNode = Doc.SelectNodes("texts"); foreach (XmlNode node in TextNode) { node.InnerXml = node.InnerXml.Replace(" ", ""); XmlNodeList entries = node.SelectNodes("entry"); foreach (XmlNode entry in entries) { string entryID = entry.Attributes.GetNamedItem("id").Value; XmlNodeList LangEntry = entry.SelectNodes(_lang.ToString()); string entryTranslation = LangEntry.Item(0).InnerText; entryTranslation = entryTranslation.Replace("/n", "\n"); if (translate.ContainsKey(entryID) == false) { translate.Add(entryID, entryTranslation); } } } return (translate); }