Пример #1
0
 public void UnLock(int _cMonsterListUnLockData)
 {
     Current         = XMLMonsterListUnLock.Instance.GetMonsterListUnLockData(_cMonsterListUnLockData);
     cInherentNumber = Current.InherentNumber;
     cUnLock         = Current.UnLock;
     //if(fNumber == cInherentNumber)
     //{
     //    Lock.gameObject.SetActive(false);
     //    Debug.Log("가나다라");
     //}
 }
    public void LoadXml()
    {
        MonsterListUnLocks = new List <XMLMonsterListUnLockData>();
        XmlDocument Document = new XmlDocument();

        Document.Load(filePath);
        XmlElement MonsterListUnLockListElement = Document["MonsterListUnLockList"];

        foreach (XmlElement MonsterListUnLockElement in MonsterListUnLockListElement.ChildNodes)
        {
            XMLMonsterListUnLockData MonsterListUnLock = new XMLMonsterListUnLockData
            {
                InherentNumber = System.Convert.ToInt32(MonsterListUnLockElement.GetAttribute("InherentNumber")),
                UnLock         = System.Convert.ToInt32(MonsterListUnLockElement.GetAttribute("UnLock")),
            };
            MonsterListUnLocks.Add(MonsterListUnLock);
        }
    }