Slot.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Schedule
  4. {
  5. public class Slot : SlotBase
  6. {
  7. public Slot(ScheduleScene ss, int slotId)
  8. {
  9. this.ss = ss;
  10. this._slotId = slotId;
  11. this.textureBank = ss.textureBank;
  12. this.Update();
  13. }
  14. public List<ScheduleBase> scheduleData
  15. {
  16. get
  17. {
  18. List<ScheduleBase> list = new List<ScheduleBase>();
  19. list.AddRange(this.noonWorksData);
  20. return list;
  21. }
  22. }
  23. public override void Update()
  24. {
  25. base.Update();
  26. this.noonWorksData = new List<ScheduleBase>();
  27. this.nightWorksData = new List<ScheduleBase>();
  28. foreach (KeyValuePair<int, ScheduleCSVData.ScheduleBase> keyValuePair in ScheduleCSVData.AllData)
  29. {
  30. if (keyValuePair.Value.type == ScheduleTaskCtrl.TaskType.Training)
  31. {
  32. this.noonWorksData.Add(new ScheduleTraining(ScheduleType.Training, this, keyValuePair.Key));
  33. }
  34. else if (keyValuePair.Value.type == ScheduleTaskCtrl.TaskType.Yotogi)
  35. {
  36. this.noonWorksData.Add(new ScheduleYotogi(ScheduleType.Yotogi, this, keyValuePair.Key));
  37. }
  38. else if (keyValuePair.Value.type == ScheduleTaskCtrl.TaskType.Work)
  39. {
  40. this.noonWorksData.Add(new ScheduleWork(ScheduleType.Work, this, keyValuePair.Key));
  41. }
  42. }
  43. }
  44. protected ScheduleScene ss;
  45. public List<ScheduleBase> noonWorksData;
  46. public List<ScheduleBase> nightWorksData;
  47. }
  48. }