public static void AddListersToSpeed(UnityAction <int, int> listener) { speedListeners.Add(listener); if (invoker != null) { foreach (UnityAction <int, int> item in speedListeners) { invoker.AddListenerToSpeed(item); } } }
public static void AddInvoker(PickUpBlock script) { invoker = script; if (freezerListners != null) { invoker.AddListenerToFreezer(freezerListners); } foreach (UnityAction <int, int> item in speedListeners) { invoker.AddListenerToSpeed(item); } }