Beispiel #1
0
 void Awake()
 {
     testVM  = new ListTestVM();
     eventVM = new EventVM();
     viewRoot.Bind(testVM);
     viewRoot.Bind(eventVM);
     SetUp();
 }
Beispiel #2
0
 public BattleVM(ViewRoot root)
 {
     backButton = new BackButtonVM();
     skillInfo  = new SkillInfoVM();
     skillCutIn = new SkillCutInVM();
     root.Bind(backButton);
     root.Bind(skillInfo);
     root.Bind(skillCutIn);
 }
Beispiel #3
0
    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();
    }
Beispiel #4
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();
        }