public void SetViewModel(StickerCustomizationPopupViewModel viewModel) { disposeBag.ClearDisposables(); this.viewModel = viewModel; disposeBag.AddDisposable(viewModel.SelectedMouthName.Subscribe(name => mouthLabelName.text = name)); disposeBag.AddDisposable(viewModel.SelectedMouthIcon.Subscribe(icon => stickerMouth.sprite = icon)); CreateNewMouthsGridWithData(); }
public void SetViewModel(MouthCellViewModel viewModel) { disposeBag.ClearDisposables(); this.viewModel = viewModel; disposeBag.AddDisposable(viewModel.MouthActiveObservable.Subscribe(selectedTick.SetActive)); mouthCellButton.SetViewModel(viewModel.CreateAndSetUpMouthCellButtonViewModel()); SetMouthCellLook(); }
public void SetViewModel(MouthCellButtonViewModel viewModel) { disposeBag.ClearDisposables(); this.viewModel = viewModel; disposeBag.AddDisposable(cellButton.OnClickAsObservable().Subscribe(viewModel.ButtonClickObserver)); }