void Awake() { testVM = new ListTestVM(); eventVM = new EventVM(); viewRoot.Bind(testVM); viewRoot.Bind(eventVM); SetUp(); }
public BattleVM(ViewRoot root) { backButton = new BackButtonVM(); skillInfo = new SkillInfoVM(); skillCutIn = new SkillCutInVM(); root.Bind(backButton); root.Bind(skillInfo); root.Bind(skillCutIn); }
void Awake() { data = SaveDataFiler.Load <SaveData>(0); if (data == null) { Debug.Log("Non Save Data"); data = new SaveData(); } viewRoot.Bind(textVM = new TextVM()); viewRoot.Bind(toggleVM = new ToggleVM()); viewRoot.Bind(buttonVM = new ButtonVM()); viewRoot.Bind(dropdownVM = new DropdownVM()); SetDefault(); }
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(); }