예제 #1
0
        public void RemoveSpirit(string spiritName)
        {
            var spiritDic = (characterInfoInfo as PlayerInfo).spiritDic;

            spiritDic.Remove(spiritName);
            AbstractSpiritItem.GetInstance(spiritName).OnDisable();
        }
예제 #2
0
        public void AddSpirit(string spiritName)
        {
            if (spiritDic.Count >= this.MaxSpiritNum)
            {
                Debug.Log("无法承载更多灵器");
                return;
            }
            var spirit = AbstractSpiritItem.GetInstance(spiritName);

            spiritDic.Add(spiritName, spirit);
            spirit.OnEnable();
        }
예제 #3
0
 public void RemoveSpirit(string spiritName)
 {
     spiritDic.Remove(spiritName);
     AbstractSpiritItem.GetInstance(spiritName).OnDisable();
 }