public static void RemoveEvent(Enum type, ECSEventHandle handle) { if (m_EventDict.ContainsKey(type)) { m_EventDict[type] -= handle; } }
public void AddListener(string key, ECSEventHandle handle, bool certainty = false) { if (!certainty) { if (m_EventDict.ContainsKey(key)) { m_EventDict[key] += handle; } else { m_EventDict.Add(key, handle); } } else { if (m_certaintyEventDict.ContainsKey(key)) { m_certaintyEventDict[key] += handle; } else { m_certaintyEventDict.Add(key, handle); } } }
public static void AddEvent(Enum type, ECSEventHandle handle) { if (m_EventDict.ContainsKey(type)) { m_EventDict[type] += handle; } else { m_EventDict.Add(type, handle); } }
public void RemoveListener(string key, ECSEventHandle handle, bool certainty = false) { if (!certainty) { if (m_EventDict.ContainsKey(key)) { m_EventDict[key] -= handle; } } else { if (m_certaintyEventDict.ContainsKey(key)) { m_certaintyEventDict[key] -= handle; } } }