ResultBaseTask.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using System;
  2. using BackupParamAccessor;
  3. using PlayerStatus;
  4. using UnityEngine;
  5. namespace Schedule
  6. {
  7. public class ResultBaseTask
  8. {
  9. public int id
  10. {
  11. get
  12. {
  13. return this._id;
  14. }
  15. }
  16. public WorkResultSlot slot
  17. {
  18. get
  19. {
  20. return this._slot;
  21. }
  22. }
  23. public Maid maid
  24. {
  25. get
  26. {
  27. if (this.slot != null)
  28. {
  29. return this.slot.maid;
  30. }
  31. return null;
  32. }
  33. }
  34. public Texture2D icon
  35. {
  36. get
  37. {
  38. return this._icon;
  39. }
  40. }
  41. public string icon_name
  42. {
  43. get
  44. {
  45. return ScheduleCSVData.AllData[this.id].icon;
  46. }
  47. }
  48. protected void Init(WorkResultSlot slot, int workId, ResultWorkMgr.ResultType resultType)
  49. {
  50. this._id = workId;
  51. this._slot = slot;
  52. this.resultType = resultType;
  53. this.CalcParamTask();
  54. }
  55. protected void CalcParamTask()
  56. {
  57. ResultWorkMgr.ResultType resultType = this.resultType;
  58. if (resultType != ResultWorkMgr.ResultType.Daytime)
  59. {
  60. if (resultType == ResultWorkMgr.ResultType.Night)
  61. {
  62. this.CalcParam(SCENE_ID.Night);
  63. }
  64. }
  65. else
  66. {
  67. this.CalcParam(SCENE_ID.Noon);
  68. }
  69. }
  70. protected virtual void CalcParam(SCENE_ID baseId)
  71. {
  72. }
  73. protected ResultWorkMgr.ResultType resultType;
  74. protected int _id;
  75. protected WorkResultSlot _slot;
  76. public ScheduleData.WorkSuccessLv commonSuccessLv;
  77. public Texture2D successLv_icon;
  78. public string successLvName;
  79. protected Texture2D _icon;
  80. public Params uppedParams;
  81. protected const string SUCCESS_LV_ICON_MISS = "CM3D2_work_result_mark_sippai";
  82. protected const string SUCCESS_LV_ICON_SUCCESS = "CM3D2_work_result_mark_seikou";
  83. protected const string SUCCESS_LV_ICON_PERFECT = "CM3D2_work_result_mark_daiseikou";
  84. protected const string BONUS_ICON_MISS = "CM3D2_work_result_mark_sippai2";
  85. protected const string BONUS_ICON_SUCCESS = "CM3D2_work_result_mark_seikou2";
  86. protected const string BONUS_ICON_PERFECT = "CM3D2_work_result_mark_daiseikou2";
  87. protected const string BONUS_ICON_COMMUNICATION = "CM3D2_work_result_mark_commubonus";
  88. }
  89. }