StatusMgr.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. using System;
  2. using System.Collections.Generic;
  3. using MaidStatus;
  4. using UnityEngine;
  5. public class StatusMgr : BaseCreatePanel
  6. {
  7. public override void Init()
  8. {
  9. this.m_goPanel = base.GetPanel("StatusPanel");
  10. this.m_ctrl = base.GetCtrl<StatusCtrl>();
  11. this.m_ctrl.Init(this, this.m_goPanel);
  12. this.m_goPanel.SetActive(false);
  13. }
  14. public void OpenStatusPanel()
  15. {
  16. Debug.Log("ステータスをオープンしました。");
  17. base.SetDurationToFadeIn(0f);
  18. base.SetDurationToFadeOut(0f);
  19. base.BaseOpenPanel();
  20. }
  21. public void UpdateMaidStatus(Maid maid)
  22. {
  23. this.m_maid = maid;
  24. StatusCtrl.Status status = this.LoadData();
  25. this.m_ctrl.CreateViewer(status);
  26. }
  27. protected override void OpenPanel()
  28. {
  29. }
  30. public void CloseStatusPanel()
  31. {
  32. base.BaseClosePanel();
  33. }
  34. protected override void AfterClose()
  35. {
  36. if (this.sceneMgr != null)
  37. {
  38. this.sceneMgr.CloseScene();
  39. }
  40. }
  41. protected override void SetFadeTargetPanel()
  42. {
  43. this.fadeTargetPanel = this.m_goPanel;
  44. }
  45. private StatusCtrl.Status LoadData()
  46. {
  47. StatusCtrl.Status status = new StatusCtrl.Status();
  48. status.maidIcon = this.m_maid.GetThumIcon();
  49. NamePair charaName = this.m_maid.status.charaName;
  50. status.lastName = charaName.name1;
  51. status.firstName = charaName.name2;
  52. status.contractType = EnumConvert.GetString(this.m_maid.status.contract);
  53. status.contractTypeTerm = EnumConvert.GetTerm(this.m_maid.status.contract);
  54. status.personal = this.m_maid.status.personal.drawName;
  55. status.personalTerm = this.m_maid.status.personal.termName;
  56. status.sexualExperience = EnumConvert.GetString(this.m_maid.status.seikeiken);
  57. status.sexualExperienceTerm = EnumConvert.GetTerm(this.m_maid.status.seikeiken);
  58. ClassData<JobClass.Data> selectedJobClass = this.m_maid.status.selectedJobClass;
  59. if (selectedJobClass != null)
  60. {
  61. status.maidClassName = selectedJobClass.data.drawName;
  62. status.maidClassNameTerm = selectedJobClass.data.termName;
  63. status.maidClassLevel = selectedJobClass.level;
  64. status.maidClassExp = selectedJobClass.cur_exp;
  65. status.maidClassRequiredExp = selectedJobClass.next_exp;
  66. }
  67. ClassData<YotogiClass.Data> selectedYotogiClass = this.m_maid.status.selectedYotogiClass;
  68. if (selectedYotogiClass != null)
  69. {
  70. status.yotogiClassName = selectedYotogiClass.data.drawName;
  71. status.yotogiClassLevel = selectedYotogiClass.level;
  72. status.yotogiClassExp = selectedYotogiClass.cur_exp;
  73. status.yotogiClassRequiredExp = selectedYotogiClass.next_exp;
  74. }
  75. status.height = this.m_maid.status.body.height;
  76. status.weight = this.m_maid.status.body.weight;
  77. status.bust = this.m_maid.status.body.bust;
  78. status.cup = this.m_maid.status.body.cup;
  79. status.waist = this.m_maid.status.body.waist;
  80. status.hip = this.m_maid.status.body.hip;
  81. status.hp = this.m_maid.status.maxHp;
  82. status.mind = this.m_maid.status.maxMind;
  83. status.likability = this.m_maid.status.likability;
  84. status.care = this.m_maid.status.care;
  85. status.reception = this.m_maid.status.reception;
  86. status.cooking = this.m_maid.status.cooking;
  87. status.dance = this.m_maid.status.dance;
  88. status.vocal = this.m_maid.status.vocal;
  89. status.appeal = this.m_maid.status.maxAppealPoint;
  90. status.studyRate = this.m_maid.status.studyRate;
  91. status.teachRate = this.m_maid.status.teachRate;
  92. status.lovely = this.m_maid.status.lovely;
  93. status.elegance = this.m_maid.status.elegance;
  94. status.charm = this.m_maid.status.charm;
  95. status.inran = this.m_maid.status.inyoku;
  96. status.mValue = this.m_maid.status.mvalue;
  97. status.hentai = this.m_maid.status.hentai;
  98. status.housi = this.m_maid.status.housi;
  99. status.relation = EnumConvert.GetString(this.m_maid.status.relation, this.m_maid.status.additionalRelation);
  100. status.relationTerm = EnumConvert.GetTerm(this.m_maid.status.relation, this.m_maid.status.additionalRelation);
  101. if (this.m_maid.status.OldStatus != null)
  102. {
  103. if (this.m_maid.status.OldStatus.isMarriage)
  104. {
  105. status.relation = "嫁";
  106. }
  107. if (this.m_maid.status.OldStatus.isNewWife)
  108. {
  109. status.relation = "新妻";
  110. }
  111. status.relationTerm = string.Empty;
  112. }
  113. status.conditionText = this.m_maid.status.conditionText;
  114. status.conditionTextTerm = this.m_maid.status.conditionTermText;
  115. status.yotogiPlayCount = this.m_maid.status.playCountYotogi;
  116. status.othersPlayCount = this.m_maid.status.playCountNightWork;
  117. status.ranking = this.m_maid.status.popularRank;
  118. status.acquisitionOfClientEvaluation = this.m_maid.status.totalEvaluations;
  119. status.acquisitionOfWorkingFunds = this.m_maid.status.totalSales;
  120. status.daysOfEmployment = this.m_maid.status.employmentElapsedDay;
  121. if (this.m_maid.status.heroineType == HeroineType.Sub)
  122. {
  123. SubMaid.Data.CharacterStatus subCharaStatus = this.m_maid.status.subCharaStatus;
  124. status.contractType = subCharaStatus.contractText;
  125. status.personal = subCharaStatus.personalText;
  126. status.conditionText = subCharaStatus.relationText;
  127. status.contractTypeTerm = subCharaStatus.contractTextTerm;
  128. status.personalTerm = subCharaStatus.personalTextTerm;
  129. status.conditionTextTerm = subCharaStatus.relationTextTerm;
  130. }
  131. if (this.m_maid.status.OldStatus != null)
  132. {
  133. status.mouth = this.m_maid.status.OldStatus.sexual.mouth;
  134. status.throat = this.m_maid.status.OldStatus.sexual.throat;
  135. status.nipple = this.m_maid.status.OldStatus.sexual.nipple;
  136. status.curi = this.m_maid.status.OldStatus.sexual.curi;
  137. }
  138. return status;
  139. }
  140. protected StatusCtrl m_ctrl;
  141. protected Maid m_maid;
  142. protected Dictionary<int, string> m_dicCrownIcon;
  143. }