public static bool Remove(T item, int mask) { var r1 = GlobalList <T> .Remove(item); var r2 = maskedLists[mask].Remove(item); return(r1 || r2); }
public virtual void OnDisable() { GlobalList.RemoveReference(this); }
public static void Add(T item, int mask) { GlobalList <T> .Add(item); maskedLists[mask].Add(item); }
public virtual void OnEnable() { // While ineffecient, guarantees that you don't forget calling it. // Override this method if you don't want this functionality. GlobalList.AddReference(this); }