Ejemplo n.º 1
0
 void SaveOriData(ChickenScoreView view)
 {
     view.oriShow = _show;
     view.oriTotalPlayerInfoShow       = _totalPlayerInfoShow;
     view.oriBeatGroupShow             = _beatGroupShow;
     view.oriBeatPlayerCountString     = _beatPlayerCountString;
     view.oriSurvivalGroupShow         = _survivalGroupShow;
     view.oriSurvivalPlayerCountString = _survivalPlayerCountString;
     view.oriJoinGroupShow             = _joinGroupShow;
     view.oriJoinPlayerCountString     = _joinPlayerCountString;
 }
Ejemplo n.º 2
0
 void DataInit(ChickenScoreView view)
 {
     _show = view.Show.activeSelf;
     _totalPlayerInfoShow       = view.TotalPlayerInfoShow.activeSelf;
     _beatGroupShow             = view.BeatGroupShow.activeSelf;
     _beatPlayerCountString     = view.BeatPlayerCountString.text;
     _survivalGroupShow         = view.SurvivalGroupShow.activeSelf;
     _survivalPlayerCountString = view.SurvivalPlayerCountString.text;
     _joinGroupShow             = view.JoinGroupShow.activeSelf;
     _joinPlayerCountString     = view.JoinPlayerCountString.text;
 }
Ejemplo n.º 3
0
        void ViewBind(ChickenScoreView view)
        {
            BindingSet <ChickenScoreView, ChickenScoreViewModel> bindingSet =
                view.CreateBindingSet <ChickenScoreView, ChickenScoreViewModel>();

            bindingSet.Bind(view.Show).For(v => v.activeSelf).To(vm => vm.Show).OneWay();
            bindingSet.Bind(view.TotalPlayerInfoShow).For(v => v.activeSelf).To(vm => vm.TotalPlayerInfoShow).OneWay();
            bindingSet.Bind(view.BeatGroupShow).For(v => v.activeSelf).To(vm => vm.BeatGroupShow).OneWay();
            bindingSet.Bind(view.BeatPlayerCountString).For(v => v.text).To(vm => vm.BeatPlayerCountString).OneWay();
            bindingSet.Bind(view.SurvivalGroupShow).For(v => v.activeSelf).To(vm => vm.SurvivalGroupShow).OneWay();
            bindingSet.Bind(view.SurvivalPlayerCountString).For(v => v.text).To(vm => vm.SurvivalPlayerCountString).OneWay();
            bindingSet.Bind(view.JoinGroupShow).For(v => v.activeSelf).To(vm => vm.JoinGroupShow).OneWay();
            bindingSet.Bind(view.JoinPlayerCountString).For(v => v.text).To(vm => vm.JoinPlayerCountString).OneWay();

            bindingSet.Build();
        }
Ejemplo n.º 4
0
        public void CreateBinding(GameObject obj)
        {
            _viewGameObject = obj;
            _viewCanvas     = _viewGameObject.GetComponent <Canvas>();

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

            if (view == null)
            {
                bFirst = true;
                view   = obj.AddComponent <ChickenScoreView>();
                view.FillField();
            }
            DataInit(view);
            SpriteReset();
            view.BindingContext().DataContext = this;
            if (bFirst)
            {
                SaveOriData(view);
                ViewBind(view);
            }
            _view = view;
        }
Ejemplo n.º 5
0
 private void EventTriggerBind(ChickenScoreView view)
 {
 }