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); }
private void OnDisable() { playerMoveStateChange.RemoveListener(ChangePlayerMoveState); }
public static void AddOnce(this BoolEvent thisEvent, UnityAction <bool> reciever) { thisEvent.RemoveListener(reciever); thisEvent.AddListener(reciever); }
private void OnDisable() { OnPressPauze.RemoveListener(OnPauzePressed); OnPauzeGame.RemoveListener(OnGamePauzed); }