Example #1
0
		public void BindVM(BattleData data)
		{
			ViewRoot root = Object.FindObjectOfType<ViewRoot>();
			List<UnitVM> playerUnits = CreateUnitVMList(data.PlayerUnit.GetData());
			List<UnitVM> rivalUnits = CreateUnitVMList(data.RivalUnit.GetData());
			this.unitListVM = new UnitListVM(playerUnits, rivalUnits);
			this.battleVM = new BattleVM(root);
			this.guideVM = new GuideVM() { GuideText = "" };
			root.Bind(this.unitListVM);
			root.Bind(this.guideVM);
			root.SetContext();
		}
Example #2
0
        public void BindVM(BattleData data)
        {
            ViewRoot      root        = Object.FindObjectOfType <ViewRoot>();
            List <UnitVM> playerUnits = CreateUnitVMList(data.PlayerUnit.GetData());
            List <UnitVM> rivalUnits  = CreateUnitVMList(data.RivalUnit.GetData());

            this.unitListVM = new UnitListVM(playerUnits, rivalUnits);
            this.battleVM   = new BattleVM(root);
            this.guideVM    = new GuideVM()
            {
                GuideText = ""
            };
            root.Bind(this.unitListVM);
            root.Bind(this.guideVM);
            root.SetContext();
        }