public void RemoveOnLoadDoneCallback(Action <AssetCat> onLoadDoneCallback, object callbackCause = null) { if (onLoadDoneCallback == null) { return; } this.onLoadDoneCallback -= onLoadDoneCallback; if (callbackCause == null) { callbackCause = this; } onLoadDoneCallbackListDict.Remove(callbackCause, onLoadDoneCallback); }
private void CheckEmpty() { foreach (var eventName in listenerDict.Keys) { if (listenerDict[eventName].Count == 0) { listenerDict.Remove(eventName); } } }