private void UpdateListeners(bool value)
 {
     view.CLICK_EVENT.UpdateListener(value, onViewClicked);
     GAME_UPDATE.UpdateListener(value, onGameUpdate);
     GAME_OVER.UpdateListener(value, onGameOver);
     RESTART_GAME.UpdateListener(value, onRestart);
 }
        public override void OnRegister()
        {
            view.init();

            //Listen to the global event bus for events
            RESTART_GAME.AddListener(onGameRestart);
            REWARD_TEXT.AddListener(onReward);
        }
Example #3
0
        private void UpdateListeners(bool value)
        {
            SCORE_CHANGE.UpdateListener(value, onScoreChange);
            LIVES_CHANGE.UpdateListener(value, onLivesChange);
            view.REPLAY.UpdateListener(value, onReplay);
            view.REMOVE_CONTEXT.UpdateListener(value, onRemoveContext);

            GAME_OVER.UpdateListener(value, onGameOver);
            RESTART_GAME.UpdateListener(value, onRestart);
        }
 public override void OnRemove()
 {
     //Clean up listeners when the view is about to be destroyed
     RESTART_GAME.RemoveListener(onGameRestart);
     REWARD_TEXT.RemoveListener(onReward);
 }