/// <summary> /// 获得遗物 /// </summary> /// <param name="relic"></param> public void AddRelics(AbstractRelic relic) { Relics.Add(relic); if (relic is iEventDispatcher) { Game.Instance.EventSystem.AddDispatcher(relic as iEventDispatcher); } }
/// <summary> /// 失去遗物 /// </summary> /// <param name="relic"></param> public void RemoveRelics(AbstractRelic relic) { Relics.Remove(relic); if (relic is iEventDispatcher) { Game.Instance.EventSystem.RemoveDispatcher(relic as iEventDispatcher); } }