コード例 #1
0
    public MouthCellViewModel CreateAndSetUpMouthCellViewModel(int mouthIndex)
    {
        MouthCellModel     model = stickerCustomizationPopupModel.GetDataWithIndex(mouthIndex);
        MouthCellViewModel mouthCellViewModel = new MouthCellViewModel(model, cachedResourcesLoader);

        mouthCellViewModel.SelectionIntent.Subscribe(_ => selectedMouthModel.OnNext(model));
        selectedMouthModel.Select(x => x.Id == mouthIndex).Subscribe(mouthCellViewModel.MouthActiveObserver);

        return(mouthCellViewModel);
    }
コード例 #2
0
 public MouthCellViewModel(MouthCellModel mouthCellModel, CachedResourcesLoader cachedResourcesLoader)
 {
     this.mouthCellModel        = mouthCellModel;
     this.cachedResourcesLoader = cachedResourcesLoader;
 }