예제 #1
0
        public void Init(ClientCommandRunner runner, RewardWindow.Factory rewardWindow)
        {
            _runner       = runner;
            _rewardWindow = rewardWindow;

            Button.onClick.AddListener(Execute);

            _timer = _interval;
        }
예제 #2
0
        void Init(ClientCommandRunner runner)
        {
            _runner = runner;
            _button = GetComponent <Button>();
            _button.onClick.AddListener(Execute);
            _runner.Updater.OnStateUpdated += UpdateValidation;
            var state = _runner.Updater.State;

            if (state != null)
            {
                UpdateValidation(state);
            }
        }
예제 #3
0
 public void Init(
     GameSceneManager scene, ClientCommandRunner runner, ClientStateService state,
     LevelService service, UnitViewModel.Factory unit, UnitView.Factory view, RewardWindow.Factory winWindow, LoseWindow.Factory loseWindow
     )
 {
     _scene        = scene;
     _update       = runner.Updater;
     _state        = state;
     _service      = service;
     _unit         = unit;
     _view         = view;
     _rewardWindow = winWindow;
     _loseWindow   = loseWindow;
 }
예제 #4
0
        public void Init(ClientCommandRunner runner, RewardFragment.Factory rewardFragment, Canvas parent, Context context)
        {
            _runner         = runner;
            _rewardFragment = rewardFragment;

            _runner.Updater.AddHandler <AddResourceCommand>  (OnAddResource);
            _runner.Updater.AddHandler <AddItemCommand>      (OnAddItem);
            _runner.Updater.AddHandler <AddUnitCommand>      (OnAddUnit);
            _runner.Updater.AddHandler <AddExperienceCommand>(OnAddExperience);
            _runner.Updater.AddHandler <LevelUpCommand>      (OnLevelUp);

            Header.text     = context.Header;
            ButtonText.text = context.ButtonText;
            OkButton.onClick.AddListener(() => Hide(context.Callback));

            ShowAt(parent);
        }
예제 #5
0
 public void Init(ClientCommandRunner runner)
 {
     _runner = runner;
     Button.onClick.AddListener(Execute);
 }