예제 #1
0
 /// <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);
     }
 }
예제 #2
0
    /// <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);
 }