Beispiel #1
0
    public static void StopListeningBool(string eventName, UnityAction <bool> listener)
    {
        if (eventManager == null)
        {
            return;
        }
        BoolEvent thisEvent = null;

        if (instance.BoolEventDictionary.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }
 public void RemoveOnActivityChangeListener(UnityAction <bool> listener)
 {
     onIsActiveChange?.RemoveListener(listener);
 }
Beispiel #3
0
 private void OnDisable()
 {
     playerMoveStateChange.RemoveListener(ChangePlayerMoveState);
 }
 public static void AddOnce(this BoolEvent thisEvent, UnityAction <bool> reciever)
 {
     thisEvent.RemoveListener(reciever);
     thisEvent.AddListener(reciever);
 }
Beispiel #5
0
 private void OnDisable()
 {
     OnPressPauze.RemoveListener(OnPauzePressed);
     OnPauzeGame.RemoveListener(OnGamePauzed);
 }