Example #1
0
    public static void AddCreatureKilledInvoker(ObstacleController creatureKilledInvoker)
    {
        // add the new invoker to the list of invokers
        creatureKilledInvokers.Add(creatureKilledInvoker);

        // ensure that all existing listeners are added to this new invoker
        foreach (UnityAction <string> listener in creatureKilledListeners)
        {
            creatureKilledInvoker.AddCreatureKilledListener(listener);
        }
    }