public static void AddListener(Enum type, string subType, GenCoroutineDelegate emGentor) { if (emGentor == null) { CDebug.LogError("[AddListener]emGentor Cannnot null!"); return; } var key = MakeKey(type, subType); HashSet<GenCoroutineDelegate> emGentors; if (!Instance._actionRecordCoroutine.TryGetValue(key, out emGentors)) { emGentors = Instance._actionRecordCoroutine[key] = new HashSet<GenCoroutineDelegate>(); } emGentors.Add(emGentor); }
public static void UnBind(Enum type, string subType, GenCoroutineDelegate emGentor) { var key = MakeKey(type, subType); HashSet<GenCoroutineDelegate> emGentors; if (!Instance._actionRecordCoroutine.TryGetValue(key, out emGentors)) { emGentors = Instance._actionRecordCoroutine[key] = new HashSet<GenCoroutineDelegate>(); } emGentors.Remove(emGentor); }
public static void AddListener(Enum type, GenCoroutineDelegate emGentor) { AddListener(type, null, emGentor); }