12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using Schedule;
- public class TrainingTaskUnit : TaskUnit
- {
- public ScheduleCSVData.Training training { get; private set; }
- public void SetData(ScheduleTaskViewer viewer, ScheduleTaskViewer.ViewData viewData)
- {
- base.SetData(ScheduleTaskCtrl.TaskType.Training, viewer, viewData);
- this.training = (ScheduleCSVData.Training)viewData.schedule;
- ScheduleTaskCtrl.TrainingTaskButton trainingTaskButton = (ScheduleTaskCtrl.TrainingTaskButton)viewData.taskButton;
- base.SetTaskRank(base.gameObject, trainingTaskButton.rank);
- base.SetExpRatio(base.gameObject, trainingTaskButton.expRatio);
- }
- public static void AddFacility(Maid maid, ScheduleCSVData.Training training, ScheduleMgr.ScheduleTime time)
- {
- if (DailyMgr.IsLegacy)
- {
- return;
- }
- if (training.trainingType != ScheduleCSVData.TrainingType.Basic)
- {
- return;
- }
- Facility[] facilityArray = GameMain.Instance.FacilityMgr.GetFacilityArray();
- foreach (Facility facility in facilityArray)
- {
- if (facility.defaultData.ID == training.facilityId)
- {
- facility.AllocationMaid(maid, time);
- return;
- }
- }
- }
- }
|