Exemplo n.º 1
0
 void SaveOriData(BlastScoreView view)
 {
     view.oriShow               = _show;
     view.oriTimeText           = _timeText;
     view.oriTimeColor          = _timeColor;
     view.oriScoreText          = _scoreText;
     view.oriCampKillCountText1 = _campKillCountText1;
     view.oriCampKillCountText2 = _campKillCountText2;
     view.oriC4TipGroupShow     = _c4TipGroupShow;
     view.oriC4TipValue         = _c4TipValue;
 }
Exemplo n.º 2
0
 void DataInit(BlastScoreView view)
 {
     _show               = view.Show.activeSelf;
     _timeText           = view.TimeText.text;
     _timeColor          = view.TimeColor.color;
     _scoreText          = view.ScoreText.text;
     _campKillCountText1 = view.CampKillCountText1.text;
     _campKillCountText2 = view.CampKillCountText2.text;
     _c4TipGroupShow     = view.C4TipGroupShow.activeSelf;
     _c4TipValue         = view.C4TipValue.fillAmount;
 }
Exemplo n.º 3
0
        void ViewBind(BlastScoreView view)
        {
            BindingSet <BlastScoreView, BlastScoreViewModel> bindingSet =
                view.CreateBindingSet <BlastScoreView, BlastScoreViewModel>();

            bindingSet.Bind(view.Show).For(v => v.activeSelf).To(vm => vm.Show).OneWay();
            bindingSet.Bind(view.TimeText).For(v => v.text).To(vm => vm.TimeText).OneWay();
            bindingSet.Bind(view.TimeColor).For(v => v.color).To(vm => vm.TimeColor).OneWay();
            bindingSet.Bind(view.ScoreText).For(v => v.text).To(vm => vm.ScoreText).OneWay();
            bindingSet.Bind(view.CampKillCountText1).For(v => v.text).To(vm => vm.CampKillCountText1).OneWay();
            bindingSet.Bind(view.CampKillCountText2).For(v => v.text).To(vm => vm.CampKillCountText2).OneWay();
            bindingSet.Bind(view.C4TipGroupShow).For(v => v.activeSelf).To(vm => vm.C4TipGroupShow).OneWay();
            bindingSet.Bind(view.C4TipValue).For(v => v.fillAmount).To(vm => vm.C4TipValue).OneWay();

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

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

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