public static void Broadcast(MessageName message) { MessageHandler instance = GetInstance(); Delegate _delegate; if (instance.PreBroadcasting(message, out _delegate)) { if (_delegate == null) { return; } MessageFunc source = instance.m_messageTable[message] as MessageFunc; if (source != null) { source(); } } }
public void Broadcast <T1, T2, T3, T4>(MessageName message, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { MessageHandler instance = GetInstance(); Delegate _delegate; if (instance.PreBroadcasting(message, out _delegate)) { if (_delegate == null) { return; } MessageFunc <T1, T2, T3, T4> source = instance.m_messageTable[message] as MessageFunc <T1, T2, T3, T4>; if (source != null) { source(arg1, arg2, arg3, arg4); } } }