public void RemoveSpirit(string spiritName) { var spiritDic = (characterInfoInfo as PlayerInfo).spiritDic; spiritDic.Remove(spiritName); AbstractSpiritItem.GetInstance(spiritName).OnDisable(); }
public void AddSpirit(string spiritName) { if (spiritDic.Count >= this.MaxSpiritNum) { Debug.Log("无法承载更多灵器"); return; } var spirit = AbstractSpiritItem.GetInstance(spiritName); spiritDic.Add(spiritName, spirit); spirit.OnEnable(); }
public void RemoveSpirit(string spiritName) { spiritDic.Remove(spiritName); AbstractSpiritItem.GetInstance(spiritName).OnDisable(); }