void SaveOriData(CommonRoundOverView view) { view.oriShow = _show; view.oriAnimeGroupShow = _animeGroupShow; view.oriRoundGroupShow = _roundGroupShow; view.oriTitleText = _titleText; view.oriCampScoreText1 = _campScoreText1; view.oriCampScoreText2 = _campScoreText2; }
void DataInit(CommonRoundOverView view) { _show = view.Show.activeSelf; _animeGroupShow = view.AnimeGroupShow.activeSelf; _roundGroupShow = view.RoundGroupShow.activeSelf; _titleText = view.TitleText.text; _campScoreText1 = view.CampScoreText1.text; _campScoreText2 = view.CampScoreText2.text; }
void ViewBind(CommonRoundOverView view) { BindingSet <CommonRoundOverView, CommonRoundOverViewModel> bindingSet = view.CreateBindingSet <CommonRoundOverView, CommonRoundOverViewModel>(); bindingSet.Bind(view.Show).For(v => v.activeSelf).To(vm => vm.Show).OneWay(); bindingSet.Bind(view.AnimeGroupShow).For(v => v.activeSelf).To(vm => vm.AnimeGroupShow).OneWay(); bindingSet.Bind(view.RoundGroupShow).For(v => v.activeSelf).To(vm => vm.RoundGroupShow).OneWay(); bindingSet.Bind(view.TitleText).For(v => v.text).To(vm => vm.TitleText).OneWay(); bindingSet.Bind(view.CampScoreText1).For(v => v.text).To(vm => vm.CampScoreText1).OneWay(); bindingSet.Bind(view.CampScoreText2).For(v => v.text).To(vm => vm.CampScoreText2).OneWay(); bindingSet.Build(); }
public void CreateBinding(GameObject obj) { _viewGameObject = obj; _viewCanvas = _viewGameObject.GetComponent <Canvas>(); bool bFirst = false; var view = obj.GetComponent <CommonRoundOverView>(); if (view == null) { bFirst = true; view = obj.AddComponent <CommonRoundOverView>(); view.FillField(); } DataInit(view); SpriteReset(); view.BindingContext().DataContext = this; if (bFirst) { SaveOriData(view); ViewBind(view); } _view = view; }
private void EventTriggerBind(CommonRoundOverView view) { }