コード例 #1
0
ファイル: BattleViewModels.cs プロジェクト: K-Yoshiki/menko
		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();
		}
コード例 #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();
        }