示例#1
0
        public MyLogger(IMessageService i_messenger)
        {
            UnityEngine.Debug.LogError("Initing logger");
            mMessenger = i_messenger;

            mMessenger.AddListener <LogTypes, string, string>(LOG_EVENT, LogWithCategory);
        }
示例#2
0
 private void ListenForMessages(bool i_listen)
 {
     if (i_listen)
     {
         Messenger.AddListener <IGameMonster>(GameMessages.MONSTER_ATTACK, OnAttacked);
     }
     else
     {
         Messenger.RemoveListener <IGameMonster>(GameMessages.MONSTER_ATTACK, OnAttacked);
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
 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);
     }
 }
示例#5
0
 private void ListenForMessages(bool i_listen)
 {
     if (i_listen)
     {
         MyMessenger.AddListener(GameMessages.PLAYER_DEAD, OnPlayerDied);
     }
     else
     {
         MyMessenger.RemoveListener(GameMessages.PLAYER_DEAD, OnPlayerDied);
     }
 }
示例#6
0
 private void ListenForMessages(bool i_listen)
 {
     if (i_listen)
     {
         mMessenger.AddListener <bool>(GameMessages.GAME_OVER, OnGameOver);
     }
     else
     {
         mMessenger.RemoveListener <bool>(GameMessages.GAME_OVER, OnGameOver);
     }
 }
示例#7
0
 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);
     }
 }