예제 #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);
        }
    }
예제 #2
0
 public void RemoveOnActivityChangeListener(UnityAction <bool> listener)
 {
     onIsActiveChange?.RemoveListener(listener);
 }
예제 #3
0
 private void OnDisable()
 {
     playerMoveStateChange.RemoveListener(ChangePlayerMoveState);
 }
 public static void AddOnce(this BoolEvent thisEvent, UnityAction <bool> reciever)
 {
     thisEvent.RemoveListener(reciever);
     thisEvent.AddListener(reciever);
 }
예제 #5
0
 private void OnDisable()
 {
     OnPressPauze.RemoveListener(OnPauzePressed);
     OnPauzeGame.RemoveListener(OnGamePauzed);
 }