/// <summary> /// Adds the invoker for the PathTraversalCompleteEvent /// </summary> /// <param name="invoker">invoker</param> public static void AddPathTraversalCompleteInvoker(Traveler invoker) { pathTraversalCompleteInvokers.Add(invoker); foreach (UnityAction listener in pathTraversalCompleteListeners) { invoker.AddPathTraversalCompleteListener(listener); } }
private void Start() { _traveler = GameObject.FindGameObjectWithTag("Traveler").GetComponent <Traveler>(); _traveler.AddPathTraversalCompleteListener(CheckForDestruction); }