using System; using System.Collections.Generic; namespace Schedule { public class Slot : SlotBase { public Slot(ScheduleScene ss, int slotId) { this.ss = ss; this._slotId = slotId; this.textureBank = ss.textureBank; this.Update(); } public List scheduleData { get { List list = new List(); list.AddRange(this.noonWorksData); return list; } } public override void Update() { base.Update(); this.noonWorksData = new List(); this.nightWorksData = new List(); foreach (KeyValuePair keyValuePair in ScheduleCSVData.AllData) { if (keyValuePair.Value.type == ScheduleTaskCtrl.TaskType.Training) { this.noonWorksData.Add(new ScheduleTraining(ScheduleType.Training, this, keyValuePair.Key)); } else if (keyValuePair.Value.type == ScheduleTaskCtrl.TaskType.Yotogi) { this.noonWorksData.Add(new ScheduleYotogi(ScheduleType.Yotogi, this, keyValuePair.Key)); } else if (keyValuePair.Value.type == ScheduleTaskCtrl.TaskType.Work) { this.noonWorksData.Add(new ScheduleWork(ScheduleType.Work, this, keyValuePair.Key)); } } } protected ScheduleScene ss; public List noonWorksData; public List nightWorksData; } }