public void BindEvent(string eventName, UnityAction <GameObject, EventArgs> listener) { Debug.Log("In manager, binding event"); BasicEvent tmpEvent = GetEvent(eventName); if (tmpEvent != null) { tmpEvent.AddListener(listener); } else { tmpEvent = AddEvent(eventName); tmpEvent.AddListener(listener); } }
private void Start() { _onEndGame.AddListener(CleanUp); _onChangeGameState.AddListener(CheckMoveNext); ChangeState(GameState.TitleScreen); }