12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- namespace Schedule
- {
- public class WorkResultSlot : SlotBase
- {
- public WorkResultSlot(WorkResultScene rs, int slotId)
- {
- this.wrs = rs;
- this._slotId = slotId;
- this.textureBank = rs.textureBank;
- this.Update();
- }
- public override void Update()
- {
- base.Update();
- }
- public void InitResultWork(WorkResultSceneMode mode)
- {
- if (mode == WorkResultSceneMode.Noon)
- {
- if (this.noonWorksData == null)
- {
- this.noonWorksData = this.InitResultWork(base.noonWorkId, ResultWorkMgr.ResultType.Daytime);
- }
- }
- else if (mode == WorkResultSceneMode.Night && this.nightWorksData == null)
- {
- this.nightWorksData = this.InitResultWork(base.nightWorkId, ResultWorkMgr.ResultType.Night);
- }
- }
- private ResultBaseTask InitResultWork(int workId, ResultWorkMgr.ResultType resultType)
- {
- ResultBaseTask result = null;
- if (ScheduleCSVData.AllData.ContainsKey(workId))
- {
- ScheduleCSVData.ScheduleBase scheduleBase = ScheduleCSVData.AllData[workId];
- ScheduleTaskCtrl.TaskType type = scheduleBase.type;
- if (type != ScheduleTaskCtrl.TaskType.Training)
- {
- if (type != ScheduleTaskCtrl.TaskType.Yotogi)
- {
- if (type == ScheduleTaskCtrl.TaskType.Work)
- {
- result = new ResultWorkTask(this, workId, resultType);
- }
- }
- else
- {
- result = new ResultYotogiTask(this, workId, resultType);
- }
- }
- else
- {
- result = new ResultTrainingTask(this, workId, resultType);
- }
- }
- return result;
- }
- protected WorkResultScene wrs;
- public ResultBaseTask noonWorksData;
- public ResultBaseTask nightWorksData;
- }
- }
|