예제 #1
0
        void ViewBind(CommonGameOverView view)
        {
            BindingSet <CommonGameOverView, CommonGameOverViewModel> bindingSet =
                view.CreateBindingSet <CommonGameOverView, CommonGameOverViewModel>();

            bindingSet.Bind(view.Show).For(v => v.activeSelf).To(vm => vm.Show).OneWay();
            bindingSet.Bind(view.ContinueBtnClick).For(v => v.onClick).To(vm => vm.ContinueBtnClick).OneWay();
            bindingSet.Bind(view.ContinueBtnShow).For(v => v.activeSelf).To(vm => vm.ContinueBtnShow).OneWay();

            bindingSet.Build();
        }
예제 #2
0
        public void CreateBinding(GameObject obj)
        {
            _viewGameObject = obj;
            _viewCanvas     = _viewGameObject.GetComponent <Canvas>();

            bool bFirst = false;
            var  view   = obj.GetComponent <CommonGameOverView>();

            if (view == null)
            {
                bFirst = true;
                view   = obj.AddComponent <CommonGameOverView>();
                view.FillField();
            }
            DataInit(view);
            SpriteReset();
            view.BindingContext().DataContext = this;
            if (bFirst)
            {
                SaveOriData(view);
                ViewBind(view);
            }
            _view = view;
        }
예제 #3
0
 void SaveOriData(CommonGameOverView view)
 {
     view.oriShow            = _show;
     view.oriContinueBtnShow = _continueBtnShow;
 }
예제 #4
0
 void DataInit(CommonGameOverView view)
 {
     _show            = view.Show.activeSelf;
     _continueBtnShow = view.ContinueBtnShow.activeSelf;
 }
예제 #5
0
 private void EventTriggerBind(CommonGameOverView view)
 {
 }