StatusMgr.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. status.firstName = this.m_maid.status.firstName;
  50. status.lastName = this.m_maid.status.lastName;
  51. status.contractType = EnumConvert.GetString(this.m_maid.status.contract);
  52. status.personal = this.m_maid.status.personal.drawName;
  53. status.sexualExperience = EnumConvert.GetString(this.m_maid.status.seikeiken);
  54. ClassData<JobClass.Data> selectedJobClass = this.m_maid.status.selectedJobClass;
  55. if (selectedJobClass != null)
  56. {
  57. status.maidClassName = selectedJobClass.data.drawName;
  58. status.maidClassLevel = selectedJobClass.level;
  59. status.maidClassExp = selectedJobClass.cur_exp;
  60. status.maidClassRequiredExp = selectedJobClass.next_exp;
  61. }
  62. ClassData<YotogiClass.Data> selectedYotogiClass = this.m_maid.status.selectedYotogiClass;
  63. if (selectedYotogiClass != null)
  64. {
  65. status.yotogiClassName = selectedYotogiClass.data.drawName;
  66. status.yotogiClassLevel = selectedYotogiClass.level;
  67. status.yotogiClassExp = selectedYotogiClass.cur_exp;
  68. status.yotogiClassRequiredExp = selectedYotogiClass.next_exp;
  69. }
  70. status.height = this.m_maid.status.body.height;
  71. status.weight = this.m_maid.status.body.weight;
  72. status.bust = this.m_maid.status.body.bust;
  73. status.cup = this.m_maid.status.body.cup;
  74. status.waist = this.m_maid.status.body.waist;
  75. status.hip = this.m_maid.status.body.hip;
  76. status.hp = this.m_maid.status.maxHp;
  77. status.mind = this.m_maid.status.maxMind;
  78. status.likability = this.m_maid.status.likability;
  79. status.care = this.m_maid.status.care;
  80. status.reception = this.m_maid.status.reception;
  81. status.cooking = this.m_maid.status.cooking;
  82. status.dance = this.m_maid.status.dance;
  83. status.vocal = this.m_maid.status.vocal;
  84. status.appeal = this.m_maid.status.maxAppealPoint;
  85. status.studyRate = this.m_maid.status.studyRate;
  86. status.teachRate = this.m_maid.status.teachRate;
  87. status.lovely = this.m_maid.status.lovely;
  88. status.elegance = this.m_maid.status.elegance;
  89. status.charm = this.m_maid.status.charm;
  90. status.inran = this.m_maid.status.inyoku;
  91. status.mValue = this.m_maid.status.mvalue;
  92. status.hentai = this.m_maid.status.hentai;
  93. status.housi = this.m_maid.status.housi;
  94. status.relation = EnumConvert.GetString(this.m_maid.status.relation);
  95. if (this.m_maid.status.OldStatus != null)
  96. {
  97. if (this.m_maid.status.OldStatus.isMarriage)
  98. {
  99. status.relation = "嫁";
  100. }
  101. if (this.m_maid.status.OldStatus.isNewWife)
  102. {
  103. status.relation = "新妻";
  104. }
  105. }
  106. status.conditionText = this.m_maid.status.conditionText;
  107. status.yotogiPlayCount = this.m_maid.status.playCountYotogi;
  108. status.othersPlayCount = this.m_maid.status.playCountNightWork;
  109. status.ranking = this.m_maid.status.popularRank;
  110. status.acquisitionOfClientEvaluation = this.m_maid.status.totalEvaluations;
  111. status.acquisitionOfWorkingFunds = this.m_maid.status.totalSales;
  112. status.daysOfEmployment = this.m_maid.status.employmentElapsedDay;
  113. if (this.m_maid.status.heroineType == HeroineType.Sub)
  114. {
  115. SubMaid.Data.CharacterStatus subCharaStatus = this.m_maid.status.subCharaStatus;
  116. status.contractType = subCharaStatus.contractText;
  117. status.personal = subCharaStatus.personalText;
  118. }
  119. if (this.m_maid.status.OldStatus != null)
  120. {
  121. status.mouth = this.m_maid.status.OldStatus.sexual.mouth;
  122. status.throat = this.m_maid.status.OldStatus.sexual.throat;
  123. status.nipple = this.m_maid.status.OldStatus.sexual.nipple;
  124. status.curi = this.m_maid.status.OldStatus.sexual.curi;
  125. }
  126. return status;
  127. }
  128. protected StatusCtrl m_ctrl;
  129. protected Maid m_maid;
  130. protected Dictionary<int, string> m_dicCrownIcon;
  131. }