DescResultYotogi.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. using System;
  2. using UnityEngine;
  3. public class DescResultYotogi : DescResulteBase
  4. {
  5. public override void Init(ResultWorkMgr resultWorkMgr, ResultWorkCtrl ctrl, GameObject goPanel)
  6. {
  7. base.Init(resultWorkMgr, ctrl, goPanel);
  8. GameObject gameObject = base.gameObject;
  9. this.m_goResultYotogi = UTY.GetChildObject(gameObject, "MaidStatus", false);
  10. this.m_lHousi = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "Housi");
  11. this.m_lInran = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "Inran");
  12. this.m_lMValue = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "MValue");
  13. this.m_lHentai = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "Hentai");
  14. this.m_lYotogiClassLevel = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "YotogiClassLevel");
  15. this.m_lYotogiClassExp = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "YotogiClassExp");
  16. this.m_lYotogiPlayCount = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "YotogiPlayCount");
  17. this.m_lOthersPlayCount = new DescResulteBase.ParamSet(this.m_goMaidParameterParent, "OthersPlayCount");
  18. this.m_goIndividualEvaluation = UTY.GetChildObject(gameObject, "IndividualEvaluation", false);
  19. this.m_lAcquisitionOfClientEvaluation = new DescResulteBase.ParamSet(this.m_goIndividualEvaluation, "AcquisitionOfClientEvaluation");
  20. this.m_lAcquisitionOfWorkingFunds = new DescResulteBase.ParamSet(this.m_goIndividualEvaluation, "AcquisitionOfWorkingFunds");
  21. this.m_listMaidItem.Add(this.m_lHousi.GetVariableItem());
  22. this.m_listMaidItem.Add(this.m_lInran.GetVariableItem());
  23. this.m_listMaidItem.Add(this.m_lMValue.GetVariableItem());
  24. this.m_listMaidItem.Add(this.m_lHentai.GetVariableItem());
  25. this.m_listMaidItem.Add(this.m_lYotogiClassLevel.GetVariableItem());
  26. this.m_listMaidItem.Add(this.m_lYotogiClassExp.GetVariableItem());
  27. this.m_listMaidItem.Add(this.m_lYotogiPlayCount.GetVariableItem());
  28. this.m_listMaidItem.Add(this.m_lOthersPlayCount.GetVariableItem());
  29. this.m_listMaidItem.Add(this.m_lAcquisitionOfClientEvaluation.GetVariableItem());
  30. this.m_listMaidItem.Add(this.m_lAcquisitionOfWorkingFunds.GetVariableItem());
  31. this.m_spBGOfParameterViewer = UTY.GetChildObject(this.m_goResultYotogi, "BG", false).GetComponent<UISprite>();
  32. GameObject childObject = UTY.GetChildObject(this.m_goResultYotogi, "Title", false);
  33. this.m_heightOfMaidParameterTitle = childObject.GetComponent<UISprite>().height;
  34. base.gameObject.SetActive(false);
  35. }
  36. public override void UpdateView(string buttonName)
  37. {
  38. this.m_resultWorkCtrl.SetSelectedRowActive(buttonName);
  39. int slotNoByButtonName = ScheduleCtrl.GetSlotNoByButtonName(buttonName);
  40. ResultWorkCtrl.ResultWork resultWorkBySlotNo = this.m_resultWorkCtrl.GetResultWorkBySlotNo(slotNoByButtonName);
  41. if (resultWorkBySlotNo.hasResult)
  42. {
  43. this.LoadResultNightStatus(slotNoByButtonName);
  44. }
  45. else
  46. {
  47. Debug.LogWarning(string.Format("スロットNo={0}には仕事の結果データが存在しません。", slotNoByButtonName));
  48. }
  49. base.ActivePanel(true);
  50. }
  51. private void LoadResultNightStatus(int slotNo)
  52. {
  53. this.SetStatusViewer(true);
  54. ResultWorkCtrl.UpperMaidStatus maidStatusBySlotNo = base.GetMaidStatusBySlotNo(slotNo);
  55. if (maidStatusBySlotNo != null)
  56. {
  57. this.SetMaxYotogiClassLevelIcon(slotNo, maidStatusBySlotNo.yotogiLvCompletion);
  58. this.UpdateAddValue(maidStatusBySlotNo);
  59. bool active = this.ExamineDisplayItem();
  60. this.m_goResultYotogi.SetActive(active);
  61. }
  62. else
  63. {
  64. this.SetStatusViewer(false);
  65. }
  66. }
  67. protected override void UpdateAddValue(ResultWorkCtrl.UpperMaidStatus maidStatus)
  68. {
  69. base.UpdateAddValue(maidStatus);
  70. this.m_lAcquisitionOfClientEvaluation.AddValueText = base.Sign(maidStatus.evaluation);
  71. this.m_lAcquisitionOfWorkingFunds.AddValueText = base.Sign(maidStatus.income, "#,0");
  72. this.m_lInran.AddValueText = base.Sign(maidStatus.inyoku);
  73. this.m_lMValue.AddValueText = base.Sign(maidStatus.m_value);
  74. this.m_lHentai.AddValueText = base.Sign(maidStatus.hentai);
  75. this.m_lHousi.AddValueText = base.Sign(maidStatus.housi);
  76. this.m_lYotogiClassLevel.AddValueText = base.Sign(maidStatus.yotogiClassLevel);
  77. this.m_lYotogiClassExp.AddValueText = base.Sign(maidStatus.yotogiClassExp);
  78. this.m_lYotogiPlayCount.AddValueText = base.Sign(maidStatus.yotogiPlayCount);
  79. this.m_lOthersPlayCount.AddValueText = base.Sign(maidStatus.othersPlayCount);
  80. }
  81. private void SetMaxYotogiClassLevelIcon(int slotNo, bool reachMaxLevel)
  82. {
  83. string key = slotNo.ToString();
  84. if (this.m_dicResultWork.ContainsKey(key))
  85. {
  86. ResultWorkCtrl.ResultWork resultWork = this.m_dicResultWork[key];
  87. resultWork.goIconYotogiClassMax.SetActive(reachMaxLevel);
  88. }
  89. else
  90. {
  91. Debug.LogError(string.Format("不適切なスロットNoが選択されました。選択されたスロットNo=", slotNo + 1));
  92. }
  93. }
  94. private bool ExamineDisplayItem()
  95. {
  96. int num = ScheduleCtrl.SetActiveExceptForNothing(this.m_listMaidItem, "0");
  97. if (num == 0)
  98. {
  99. return false;
  100. }
  101. BaseCreateViewerCtrl.Reposition(this.m_goMaidParameterParent);
  102. this.m_resultWorkCtrl.AdjustParameterViewer(this.m_goMaidParameterParent, num, this.m_heightOfMaidParameterTitle, this.m_spBGOfParameterViewer);
  103. return true;
  104. }
  105. private void SetStatusViewer(bool active)
  106. {
  107. this.m_goIndividualEvaluation.SetActive(active);
  108. this.m_goResultYotogi.SetActive(active);
  109. }
  110. private GameObject m_goIndividualEvaluation;
  111. private GameObject m_goResultYotogi;
  112. private UISprite m_spBGOfParameterViewer;
  113. private DescResulteBase.ParamSet m_lHousi;
  114. private DescResulteBase.ParamSet m_lInran;
  115. private DescResulteBase.ParamSet m_lMValue;
  116. private DescResulteBase.ParamSet m_lHentai;
  117. private DescResulteBase.ParamSet m_lYotogiClassLevel;
  118. private DescResulteBase.ParamSet m_lYotogiClassExp;
  119. private DescResulteBase.ParamSet m_lYotogiPlayCount;
  120. private DescResulteBase.ParamSet m_lOthersPlayCount;
  121. private DescResulteBase.ParamSet m_lAcquisitionOfClientEvaluation;
  122. private DescResulteBase.ParamSet m_lAcquisitionOfWorkingFunds;
  123. }