EventManager.OnLevelWasLoaded C# (CSharp) Méthode

OnLevelWasLoaded() private méthode

private OnLevelWasLoaded ( ) : void
Résultat void
    private void OnLevelWasLoaded()
    {
        if (allowAutoCleanUp) {
            ArrayList removeList; // create remove list to not break the enumerator
            ArrayList listenerList;
            foreach (DictionaryEntry listenerListObj in _listeners) {
                listenerList = listenerListObj.Value as ArrayList;
                removeList = new ArrayList();
                // find and add to remove list
         			foreach (EventListener callback in listenerList) {
                    if (callback.listener == null) {
                        removeList.Add(callback);
                    }
                }
                // remove from list
                foreach (EventListener callback in removeList) {
                    listenerList.Remove(callback);
                }
            }
        }
    }