Пример #1
0
        internal static List <InvokableActionBase> GetActionsByName(string eventName)
        {
            if (GlobalEventTable.TryGetValue(eventName, out List <InvokableActionBase> actions))
            {
                return(actions);
            }

            return(null);
        }
Пример #2
0
 internal static void SubscribeInternal(string eventName, InvokableActionBase action)
 {
     if (GlobalEventTable.TryGetValue(eventName, out List <InvokableActionBase> actions))
     {
         actions.Add(action);
     }
     else
     {
         actions = new List <InvokableActionBase>();
         actions.Add(action);
         GlobalEventTable.Add(eventName, actions);
     }
 }