void SaveOriData(CommonGameTitleView view) { view.oriShow = _show; view.oriKdShow = _kdShow; view.oriAceShow = _aceShow; view.oriSecondShow = _secondShow; view.oriThirdShow = _thirdShow; }
void DataInit(CommonGameTitleView view) { _show = view.Show.activeSelf; _kdShow = view.KdShow.activeSelf; _aceShow = view.AceShow.activeSelf; _secondShow = view.SecondShow.activeSelf; _thirdShow = view.ThirdShow.activeSelf; }
void ViewBind(CommonGameTitleView view) { BindingSet <CommonGameTitleView, CommonGameTitleViewModel> bindingSet = view.CreateBindingSet <CommonGameTitleView, CommonGameTitleViewModel>(); bindingSet.Bind(view.Show).For(v => v.activeSelf).To(vm => vm.Show).OneWay(); bindingSet.Bind(view.KdShow).For(v => v.activeSelf).To(vm => vm.KdShow).OneWay(); bindingSet.Bind(view.AceShow).For(v => v.activeSelf).To(vm => vm.AceShow).OneWay(); bindingSet.Bind(view.SecondShow).For(v => v.activeSelf).To(vm => vm.SecondShow).OneWay(); bindingSet.Bind(view.ThirdShow).For(v => v.activeSelf).To(vm => vm.ThirdShow).OneWay(); bindingSet.Build(); }
public void CreateBinding(GameObject obj) { _viewGameObject = obj; _viewCanvas = _viewGameObject.GetComponent <Canvas>(); bool bFirst = false; var view = obj.GetComponent <CommonGameTitleView>(); if (view == null) { bFirst = true; view = obj.AddComponent <CommonGameTitleView>(); view.FillField(); } DataInit(view); SpriteReset(); view.BindingContext().DataContext = this; if (bFirst) { SaveOriData(view); ViewBind(view); } _view = view; }
private void EventTriggerBind(CommonGameTitleView view) { }