public bool RemoveEffector(int effectorID) { if (effectorIDs.Contains(effectorID)) { effectorIDs.Remove(effectorID); OnEffectorChanged?.Invoke(this, effectorID, DataChangeCode.Remove); return(true); } else { return(false); } }
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); } }
public bool AddEffector(int effectorID) { if (effectorIDs.Contains(effectorID)) { return(false); } else { effectorIDs.Add(effectorID); OnEffectorChanged?.Invoke(this, effectorID, DataChangeCode.Add); return(true); } }