/// <summary> /// Adds the invoker for the PathFoundEvent /// </summary> /// <param name="invoker">invoker</param> public static void AddPathFoundInvoker(Traveler invoker) { pathFoundInvokers.Add(invoker); foreach (UnityAction <float> listener in pathFoundListeners) { invoker.AddPathFoundListener(listener); } }
/// <summary> /// Adds the invoker for the PathFoundEvent /// </summary> /// <param name="invoker">invoker</param> public static void AddPathFoundInvoker(Traveler invoker) { pathFoundInvokers.Add(invoker); Debug.Log("invoker added"); foreach (UnityAction <float> listener in pathFoundListeners) { Debug.Log("invoker added"); invoker.AddPathFoundListener(listener); } }
private void Awake() { traveler.AddPathFoundListener(SetPathLength); }