Exemple #1
0
 public bool RemoveEffector(int effectorID)
 {
     if (effectorIDs.Contains(effectorID))
     {
         effectorIDs.Remove(effectorID);
         OnEffectorChanged?.Invoke(this, effectorID, DataChangeCode.Remove);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
 public void LoadEffector(Effector effector)
 {
     if (effectorDictionary.ContainsKey(effector.EffectorID))
     {
         effectorDictionary[effector.EffectorID] = effector;
         OnEffectorChanged?.Invoke(effector, DataChangeCode.Update);
     }
     else
     {
         effectorDictionary.Add(effector.EffectorID, effector);
         OnEffectorChanged?.Invoke(effector, DataChangeCode.Add);
     }
 }
Exemple #3
0
 public bool AddEffector(int effectorID)
 {
     if (effectorIDs.Contains(effectorID))
     {
         return(false);
     }
     else
     {
         effectorIDs.Add(effectorID);
         OnEffectorChanged?.Invoke(this, effectorID, DataChangeCode.Add);
         return(true);
     }
 }