public MyLogger(IMessageService i_messenger) { UnityEngine.Debug.LogError("Initing logger"); mMessenger = i_messenger; mMessenger.AddListener <LogTypes, string, string>(LOG_EVENT, LogWithCategory); }
private void ListenForMessages(bool i_listen) { if (i_listen) { Messenger.AddListener <IGameMonster>(GameMessages.MONSTER_ATTACK, OnAttacked); } else { Messenger.RemoveListener <IGameMonster>(GameMessages.MONSTER_ATTACK, OnAttacked); } }
private void ListenForMessages(bool i_listen) { if (i_listen) { Messenger.AddListener <bool>(UpcomingMaintenanceManager.TRIGGER_MAINTENANCE_POPUP, OnTrigger); } else { Messenger.RemoveListener <bool>(UpcomingMaintenanceManager.TRIGGER_MAINTENANCE_POPUP, OnTrigger); } }
private void ListenForMessages(bool i_listen) { if (i_listen) { MyMessenger.AddListener <GameStates>(GameMessages.GAME_STATE_CHANGED, OnGameStateChanged); } else { MyMessenger.RemoveListener <GameStates>(GameMessages.GAME_STATE_CHANGED, OnGameStateChanged); } }
private void ListenForMessages(bool i_listen) { if (i_listen) { MyMessenger.AddListener(GameMessages.PLAYER_DEAD, OnPlayerDied); } else { MyMessenger.RemoveListener(GameMessages.PLAYER_DEAD, OnPlayerDied); } }
private void ListenForMessages(bool i_listen) { if (i_listen) { mMessenger.AddListener <bool>(GameMessages.GAME_OVER, OnGameOver); } else { mMessenger.RemoveListener <bool>(GameMessages.GAME_OVER, OnGameOver); } }
private void ListenForMessages(bool i_listen) { if (i_listen) { mMessenger.AddListener(GameMessages.PLAYER_GOLD_CHANGED, SetGoldProperty); } else { mMessenger.RemoveListener(GameMessages.PLAYER_GOLD_CHANGED, SetGoldProperty); } }
private void ListenForMessages(bool i_shouldListen) { if (i_shouldListen) { MessageService.AddListener(GameMessages.NEW_MONSTER_WAVE_EVENT, CreateMonsterViews); } else { MessageService.RemoveListener(GameMessages.NEW_MONSTER_WAVE_EVENT, CreateMonsterViews); } }