using System; using Schedule; public class WorkTaskUnit : TaskUnit { public ScheduleCSVData.Work work { get; private set; } public void SetData(ScheduleTaskViewer viewer, ScheduleTaskViewer.ViewData viewData) { base.SetData(ScheduleTaskCtrl.TaskType.Work, viewer, viewData); this.work = (ScheduleCSVData.Work)viewData.schedule; ScheduleTaskCtrl.WorkTaskButton workTaskButton = (ScheduleTaskCtrl.WorkTaskButton)viewData.taskButton; base.SetTaskRank(base.gameObject, workTaskButton.rank); base.SetExpRatio(base.gameObject, workTaskButton.expRatio); if (this.work.workTyp == ScheduleCSVData.WorkType.Basic) { base.SetTaskRank(base.gameObject, workTaskButton.rank); base.SetExpRatio(base.gameObject, workTaskButton.expRatio); base.AdjustmentTitlePos(base.gameObject, workTaskButton, true); } else if (this.work.workTyp == ScheduleCSVData.WorkType.PowerUp) { base.AdjustmentTitlePos(base.gameObject, workTaskButton, false); } } protected override void AddOnClickEvent() { EventDelegate eventDelegate = new EventDelegate(this.viewer, "OnClickTaskUnit_Work"); eventDelegate.parameters[0].value = this; EventDelegate.Add(this.Button.onClick, eventDelegate); } }