public SkillsListViewModel(SkillCollection skillCollection, TimeInputManager timeInput, GameObject anchor) { this.anchor = anchor; this.timeInput = timeInput; viewModels = new List <SkillViewModel>(); recordViewModels = new List <RecordViewModel>(); this.skillCollection = skillCollection; skillCollection.OnSkillAdded += NewSkill; }
void Start() { Prefabs prefabs = GameObject.Instantiate(prefabsPrefab); string user = staging ? "test" : "TheSammyDee"; ILevelFormula minutesFormula = new Quadratic500LevelFormula(); ILevelFormula countableFormula = new CountableLevelFormula(20, minutesFormula); TimeInputManager timeInput = new TimeInputManager(GameObject.Instantiate(prefabs.timeInputViewModel), canvas); SkillCollection skillCollection = new SkillCollection( new JsonDatabase(user, minutesFormula, countableFormula), minutesFormula, countableFormula); SkillsListViewModel listViewModel = new SkillsListViewModel(skillCollection, timeInput, listViewAnchor); }