Exemple #1
0
    public static void StopListening(string eventName, UnityAction listener)
    {
        if (levelEventHandler == null)
        {
            return;
        }
        LevelEvent thisEvent = null;

        if (instance.eventDictionary.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }
Exemple #2
0
 void WaitForLoad(Level level)
 {
     Debug.Log("Waiting...");
     GoToNextLevel();
     OnLevelLoaded.RemoveListener(WaitForLoad);
 }