public void Init(ClientCommandRunner runner, RewardWindow.Factory rewardWindow) { _runner = runner; _rewardWindow = rewardWindow; Button.onClick.AddListener(Execute); _timer = _interval; }
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); } }
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; }
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); }
public void Init(ClientCommandRunner runner) { _runner = runner; Button.onClick.AddListener(Execute); }