示例#1
0
 public void RemoveAlert(TDBaseAlertData alert)
 {
     if (alert == null)
     {
         return;
     }
     Data.Remove(alert);
     Callback_OnRemoved?.Invoke(alert);
     alert.OnBeRemoved();
     alert.OnEnd();
     AddToCache(alert);
     IDMgr.Remove(alert.ID);
 }
示例#2
0
 public void Update()
 {
     ClearDatas.Clear();
     foreach (var item in this)
     {
         item.Value.Update();
         if (item.Value.IsOver())
         {
             ClearDatas.Add(item.Key);
         }
     }
     foreach (var item in ClearDatas)
     {
         this.Remove(item);
         Callback_OnRemoved?.Invoke(item);
     }
 }
示例#3
0
 public void Remove(TData alert)
 {
     if (alert == null)
     {
         return;
     }
     alert.OnBeRemoved();
     Data.Remove(alert);
     if (alert.Type == AlertType.Interaction)
     {
         InteractionData.Remove(alert);
         Callback_OnInteractionChange?.Invoke(alert);
     }
     else if (alert.Type == AlertType.Disposable)
     {
         DisposableData.Remove(alert);
         Callback_DisposableChange?.Invoke(alert);
     }
     else if (alert.Type == AlertType.Continue)
     {
         ContinueData.Remove(alert);
         Callback_ContinueChange?.Invoke(alert);
     }
     //移除Article
     foreach (var item in alert.SelfArticle)
     {
         ArticleMgr.RemoveArticle(item);
     }
     foreach (var item in alert.TargetArticle)
     {
         ArticleMgr.RemoveArticle(item);
     }
     if (BaseGlobal.IsUnReadData)
     {
         Callback_OnRemoved?.Invoke(alert);
     }
 }
示例#4
0
 public void RemoveSkill(TData data)
 {
     Callback_OnRemoved?.Invoke(data);
     _baseSkills.Remove(data);
     data.Callback_OnCDOver -= OnSkillCDOver;
 }