ProfileCtrl.cs 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using Edit;
  5. using MaidStatus;
  6. using MaidStatus.CsvData;
  7. using UnityEngine;
  8. using Yotogis;
  9. public class ProfileCtrl : MonoBehaviour
  10. {
  11. private bool m_enabledInput
  12. {
  13. get
  14. {
  15. return BaseMgr<ProfileMgr>.Instance.m_enabledInput;
  16. }
  17. }
  18. private bool m_enabledPersonalityInput
  19. {
  20. get
  21. {
  22. return BaseMgr<ProfileMgr>.Instance.m_enabledPersonalityInput;
  23. }
  24. }
  25. public void Init(GameObject goProfilePanel, Status status)
  26. {
  27. this.m_goProfilePanel = goProfilePanel;
  28. this.m_maidStatus = status;
  29. this.m_lContractType = UTY.GetChildObject(this.m_goProfilePanel, "ContractType/OutputField", false).GetComponent<UILabel>();
  30. GameObject childObject = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/Name/FirstName", false);
  31. this.m_inFirstName = childObject.GetComponent<UIInput>();
  32. this.m_clFirstName = childObject.GetComponent<BoxCollider>();
  33. EventDelegate.Add(this.m_inFirstName.onChange, new EventDelegate.Callback(BaseMgr<ProfileMgr>.Instance.OnChangeFirstName));
  34. GameObject childObject2 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/Name/LastName", false);
  35. this.m_inLastName = childObject2.GetComponent<UIInput>();
  36. this.m_clLastName = childObject2.GetComponent<BoxCollider>();
  37. EventDelegate.Add(this.m_inLastName.onChange, new EventDelegate.Callback(BaseMgr<ProfileMgr>.Instance.OnChangeLastName));
  38. this.m_buFirstName = UTY.GetChildObject(childObject, "Random", false).GetComponent<UIButton>();
  39. EventDelegate.Add(this.m_buFirstName.onClick, delegate
  40. {
  41. this.m_inFirstName.RemoveFocus();
  42. this.m_inFirstName.value = MaidRandomName.GetFirstName();
  43. });
  44. this.m_buLastName = UTY.GetChildObject(childObject2, "Random", false).GetComponent<UIButton>();
  45. EventDelegate.Add(this.m_buLastName.onClick, delegate
  46. {
  47. this.m_inLastName.RemoveFocus();
  48. this.m_inLastName.value = MaidRandomName.GetLastName();
  49. });
  50. this.m_lMaidClassName = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/Type", false).GetComponent<UILabel>();
  51. this.m_lMaidClassLevel = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/Level", false).GetComponent<UILabel>();
  52. this.m_lMaidClassExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/Exp", false).GetComponent<UILabel>();
  53. this.m_lMaidClassRequiredExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/RequiredExp", false).GetComponent<UILabel>();
  54. this.m_lYotogiClassName = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/Type", false).GetComponent<UILabel>();
  55. this.m_lYotogiClassLevel = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/Level", false).GetComponent<UILabel>();
  56. this.m_lYotogiClassExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/Exp", false).GetComponent<UILabel>();
  57. this.m_lYotogiClassRequiredExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/RequiredExp", false).GetComponent<UILabel>();
  58. this.m_lRelation = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Relation", false).GetComponent<UILabel>();
  59. this.m_lConditionText = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/ConditionText", false).GetComponent<UILabel>();
  60. this.m_lYotogiPlayCount = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/OthersPlayCount", false).GetComponent<UILabel>();
  61. this.m_lOthersPlayCount = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiPlayCount", false).GetComponent<UILabel>();
  62. this.m_lHp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Hp", false).GetComponent<UILabel>();
  63. this.m_lLikability = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Likability", false).GetComponent<UILabel>();
  64. this.m_lMind = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Mind", false).GetComponent<UILabel>();
  65. this.m_lReception = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Reception", false).GetComponent<UILabel>();
  66. this.m_lCare = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Care", false).GetComponent<UILabel>();
  67. this.m_lStudyRate = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StudyRate", false).GetComponent<UILabel>();
  68. this.m_lTeachRate = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/TeachRate", false).GetComponent<UILabel>();
  69. GameObject childObject3 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/Personal/PopupList", false);
  70. this.m_pPersonal = childObject3.GetComponent<UIPopupList>();
  71. this.m_lPersonal = UTY.GetChildObject(childObject3, "LabelParent/Label", false).GetComponent<UILabel>();
  72. List<Personal.Data> allDatas = Personal.GetAllDatas(true);
  73. List<Personal.Data> list = new List<Personal.Data>();
  74. foreach (Personal.Data data in allDatas)
  75. {
  76. if (data.oldPersonal)
  77. {
  78. if (GameMain.Instance.CharacterMgr.status.isAvailableTransfer)
  79. {
  80. list.Add(data);
  81. }
  82. }
  83. else
  84. {
  85. list.Add(data);
  86. }
  87. }
  88. this.m_pPersonal.items.Clear();
  89. foreach (Personal.Data data2 in list)
  90. {
  91. if (data2.oldPersonal)
  92. {
  93. if (GameMain.Instance.CharacterMgr.status.isAvailableTransfer)
  94. {
  95. this.m_pPersonal.items.Add(data2.drawName);
  96. }
  97. }
  98. else
  99. {
  100. this.m_pPersonal.items.Add(data2.drawName);
  101. }
  102. }
  103. EventDelegate.Add(this.m_pPersonal.onChange, delegate
  104. {
  105. });
  106. ProfileCtrl.m_dicPersonal = new Dictionary<string, Personal.Data>();
  107. foreach (Personal.Data data3 in list)
  108. {
  109. ProfileCtrl.m_dicPersonal.Add(data3.drawName, data3);
  110. }
  111. this.m_clPersonal = childObject3.GetComponent<BoxCollider>();
  112. this.m_goPersonalSelectorIcon = UTY.GetChildObject(childObject3, "Symbol", false);
  113. GameObject childObject4 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/SexualExperience/PopupList", false);
  114. this.m_pSexualExperience = childObject4.GetComponent<UIPopupList>();
  115. ProfileCtrl.m_dicSexualExperience = new Dictionary<string, Seikeiken>();
  116. for (int i = 0; i < Enum.GetValues(typeof(Seikeiken)).Length; i++)
  117. {
  118. Seikeiken seikeiken = (Seikeiken)i;
  119. ProfileCtrl.m_dicSexualExperience.Add(EnumConvert.GetString(seikeiken), seikeiken);
  120. }
  121. this.m_clSexualExperience = childObject4.GetComponent<BoxCollider>();
  122. this.m_goSexualExperienceSelectorIcon = UTY.GetChildObject(childObject4, "Symbol", false);
  123. this.m_lHeight = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Height", false).GetComponent<UILabel>();
  124. this.m_lWeight = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Weight", false).GetComponent<UILabel>();
  125. this.m_lBust = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Bust/Bust", false).GetComponent<UILabel>();
  126. this.m_lCup = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Bust/Cup", false).GetComponent<UILabel>();
  127. this.m_lWaist = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Waist", false).GetComponent<UILabel>();
  128. this.m_lHip = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Hip", false).GetComponent<UILabel>();
  129. this.m_lCooking = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Cooking/Box", false).GetComponent<UILabel>();
  130. this.m_lDance = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Dance/Box", false).GetComponent<UILabel>();
  131. this.m_lVocal = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Vocal/Box", false).GetComponent<UILabel>();
  132. this.m_lLovely = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Lovely/Box", false).GetComponent<UILabel>();
  133. this.m_lElegance = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Elegance/Box", false).GetComponent<UILabel>();
  134. this.m_lCharm = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Charm/Box", false).GetComponent<UILabel>();
  135. this.m_lInran = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Inran/Box", false).GetComponent<UILabel>();
  136. this.m_lMValue = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/MValue/Box", false).GetComponent<UILabel>();
  137. this.m_lHentai = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Hentai/Box", false).GetComponent<UILabel>();
  138. this.m_lHousi = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Housi/Box", false).GetComponent<UILabel>();
  139. this.m_lMaidPoint = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/MaidPoint", false).GetComponent<UILabel>();
  140. this.m_goMaidPointTitleAndFrame = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/MaidPoint/MaidPointTitleAndFrame", false);
  141. this.initMaidPointUIPosX = this.m_goMaidPointTitleAndFrame.transform.parent.localPosition.x;
  142. this.m_inFreeComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/FreeCommentWindow/FreeComment", false).GetComponent<UIInput>();
  143. EventDelegate.Add(this.m_inFreeComment.onChange, new EventDelegate.Callback(BaseMgr<ProfileMgr>.Instance.OnChangeFreeComment));
  144. this.m_lProfileComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/ProfileCommentWindow/ProfileComment", false).GetComponent<UILabel>();
  145. this.m_goProfileComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/ProfileCommentWindow/ProfileComment", false);
  146. this.m_goFreeComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/FreeCommentWindow/FreeComment", false);
  147. GameObject childObject5 = UTY.GetChildObject(this.m_goProfilePanel, "Comment/ProfileCommentWindow/ProfileTab", false);
  148. this.m_bProfileTab = childObject5.GetComponent<UIButton>();
  149. this.m_goProfileTabSelector = UTY.GetChildObject(childObject5, "SelectCursor", false);
  150. GameObject childObject6 = UTY.GetChildObject(this.m_goProfilePanel, "Comment/FreeCommentWindow/FreeTab", false);
  151. this.m_bFreeTab = childObject6.GetComponent<UIButton>();
  152. this.m_goFreeTabSelector = UTY.GetChildObject(childObject6, "SelectCursor", false);
  153. this.activeColor = new Color(this.m_bProfileTab.defaultColor.r, this.m_bProfileTab.defaultColor.g, this.m_bProfileTab.defaultColor.b, 1f);
  154. this.inActiveColor = this.m_bProfileTab.defaultColor;
  155. this.m_goMaidSkillParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/MaidSkillViewer/Contents/MaidSkillUnitParent", false);
  156. this.m_goMaidSkillViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/MaidSkillViewer", false);
  157. this.m_maidSkillScrollView = UTY.GetChildObject(this.m_goMaidSkillViewer, "Contents", false).GetComponent<UIScrollView>();
  158. this.m_goCharacterParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/CharacterViewer/Contents/CharacterUnitParent", false);
  159. this.m_goCharacterViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/CharacterViewer", false);
  160. this.m_characterScrollView = UTY.GetChildObject(this.m_goCharacterViewer, "Contents", false).GetComponent<UIScrollView>();
  161. this.m_goPropensityParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/PropensityViewer/Contents/CharacterUnitParent", false);
  162. this.m_goPropensityViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/PropensityViewer", false);
  163. this.m_propensityScrollView = UTY.GetChildObject(this.m_goPropensityViewer, "Contents", false).GetComponent<UIScrollView>();
  164. this.m_goYotogiSkillParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/YotogiSkillViewer/Contents/YotogiSkillUnitParent", false);
  165. this.m_goYotogiSkillViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/YotogiSkillViewer", false);
  166. this.m_yotogiSkillScrollView = UTY.GetChildObject(this.m_goYotogiSkillViewer, "Contents", false).GetComponent<UIScrollView>();
  167. this.m_dicSpriteName = new Dictionary<ProfileCtrl.LevelOfAchievement, string>
  168. {
  169. {
  170. ProfileCtrl.LevelOfAchievement.level_1,
  171. "cm3d2_edit_profile_yotogiskill_sign_batu"
  172. },
  173. {
  174. ProfileCtrl.LevelOfAchievement.level_2,
  175. "cm3d2_edit_profile_yotogiskill_sign_sankaku"
  176. },
  177. {
  178. ProfileCtrl.LevelOfAchievement.level_3,
  179. "cm3d2_edit_profile_yotogiskill_sign_maru"
  180. },
  181. {
  182. ProfileCtrl.LevelOfAchievement.level_4,
  183. "cm3d2_edit_profile_yotogiskill_sign_nijumaru"
  184. }
  185. };
  186. this.m_dicUpperBtn = new Dictionary<ProfileMgr.UpperButtonType, ProfileCtrl.UpperButton>();
  187. IEnumerator enumerator4 = Enum.GetValues(typeof(ProfileMgr.UpperButtonType)).GetEnumerator();
  188. try
  189. {
  190. while (enumerator4.MoveNext())
  191. {
  192. object obj = enumerator4.Current;
  193. ProfileMgr.UpperButtonType upperButtonType = (ProfileMgr.UpperButtonType)obj;
  194. if (upperButtonType != ProfileMgr.UpperButtonType.None)
  195. {
  196. GameObject childObject7 = UTY.GetChildObject(this.m_goProfilePanel, "UpperButton/" + upperButtonType.ToString(), false);
  197. UIButton component = childObject7.GetComponent<UIButton>();
  198. GameObject childObject8 = UTY.GetChildObject(childObject7, "SelectCursor", false);
  199. childObject8.SetActive(false);
  200. ProfileCtrl.UpperButton upperButton = new ProfileCtrl.UpperButton();
  201. upperButton.m_btnButton = component;
  202. upperButton.m_name = upperButtonType;
  203. upperButton.m_goSelectCursor = childObject8;
  204. this.m_dicUpperBtn.Add(upperButton.m_name, upperButton);
  205. }
  206. }
  207. }
  208. finally
  209. {
  210. IDisposable disposable;
  211. if ((disposable = (enumerator4 as IDisposable)) != null)
  212. {
  213. disposable.Dispose();
  214. }
  215. }
  216. this.m_dicSubViewer = new Dictionary<ProfileMgr.UpperButtonType, GameObject>
  217. {
  218. {
  219. ProfileMgr.UpperButtonType.MaidSkill,
  220. this.m_goMaidSkillViewer
  221. },
  222. {
  223. ProfileMgr.UpperButtonType.YotogiSkill,
  224. this.m_goYotogiSkillViewer
  225. },
  226. {
  227. ProfileMgr.UpperButtonType.Character,
  228. this.m_goCharacterViewer
  229. },
  230. {
  231. ProfileMgr.UpperButtonType.Propensity,
  232. this.m_goPropensityViewer
  233. }
  234. };
  235. this.initCommentWindow();
  236. this.LoadMaidParamData();
  237. this.SetEnableInput(this.m_enabledInput, this.m_enabledPersonalityInput);
  238. this.m_bInited = true;
  239. }
  240. private void SetEnableInput(bool enabledInput, bool enabledPersonalityInput)
  241. {
  242. this.m_inFirstName.enabled = enabledInput;
  243. this.m_inLastName.enabled = enabledInput;
  244. this.m_clFirstName.enabled = enabledInput;
  245. this.m_clLastName.enabled = enabledInput;
  246. this.m_buFirstName.gameObject.SetActive(enabledInput);
  247. this.m_buLastName.gameObject.SetActive(enabledInput);
  248. this.m_pPersonal.enabled = enabledPersonalityInput;
  249. this.m_clPersonal.enabled = enabledPersonalityInput;
  250. this.m_goPersonalSelectorIcon.SetActive(enabledPersonalityInput);
  251. this.m_pSexualExperience.enabled = enabledInput;
  252. this.m_clSexualExperience.enabled = enabledInput;
  253. this.m_goSexualExperienceSelectorIcon.SetActive(enabledInput);
  254. if (enabledInput)
  255. {
  256. this.m_lMaidPoint.alpha = 1f;
  257. this.m_goMaidPointTitleAndFrame.SetActive(true);
  258. }
  259. else
  260. {
  261. this.m_lMaidPoint.alpha = 0f;
  262. this.m_goMaidPointTitleAndFrame.SetActive(false);
  263. }
  264. }
  265. public void SetActiveViewerAndButton(ProfileMgr.UpperButtonType btn)
  266. {
  267. this.SetActiveViewer(btn);
  268. this.SetActiveButton(btn);
  269. }
  270. public void SetActiveViewer(ProfileMgr.UpperButtonType btn)
  271. {
  272. Vector3 localPosition = this.m_goMaidPointTitleAndFrame.transform.parent.localPosition;
  273. this.m_goMaidPointTitleAndFrame.transform.parent.localPosition = new Vector3(this.initMaidPointUIPosX, localPosition.y, localPosition.z);
  274. foreach (ProfileMgr.UpperButtonType upperButtonType in this.m_dicSubViewer.Keys)
  275. {
  276. if (btn == upperButtonType)
  277. {
  278. GameObject gameObject = this.m_dicSubViewer[upperButtonType];
  279. gameObject.SetActive(true);
  280. localPosition = this.m_goMaidPointTitleAndFrame.transform.parent.localPosition;
  281. this.m_goMaidPointTitleAndFrame.transform.parent.localPosition = new Vector3(-270f, localPosition.y, localPosition.z);
  282. }
  283. else
  284. {
  285. GameObject gameObject2 = this.m_dicSubViewer[upperButtonType];
  286. gameObject2.SetActive(false);
  287. }
  288. }
  289. }
  290. private void SetActiveButton(ProfileMgr.UpperButtonType btn)
  291. {
  292. foreach (ProfileMgr.UpperButtonType upperButtonType in this.m_dicUpperBtn.Keys)
  293. {
  294. ProfileCtrl.UpperButton upperButton;
  295. if (this.m_dicUpperBtn.TryGetValue(upperButtonType, out upperButton))
  296. {
  297. if (btn == upperButtonType)
  298. {
  299. upperButton.m_btnButton.defaultColor = this.activeColor;
  300. upperButton.m_goSelectCursor.SetActive(true);
  301. }
  302. else
  303. {
  304. upperButton.m_btnButton.defaultColor = this.inActiveColor;
  305. upperButton.m_goSelectCursor.SetActive(false);
  306. }
  307. }
  308. }
  309. ProfileMgr.currentActiveBtn = btn;
  310. }
  311. private void initCommentWindow()
  312. {
  313. this.m_goProfileComment.SetActive(true);
  314. this.m_goFreeComment.SetActive(false);
  315. this.m_goProfileTabSelector.SetActive(true);
  316. this.m_goFreeTabSelector.SetActive(false);
  317. this.m_bProfileTab.defaultColor = this.activeColor;
  318. this.m_bFreeTab.defaultColor = this.inActiveColor;
  319. }
  320. public void LoadMaidParamData()
  321. {
  322. this.UpdateProfileData(false);
  323. this.m_lContractType.text = this.GetContractType(this.m_maidStatus.contract);
  324. this.m_inLastName.value = this.m_maidStatus.lastName;
  325. this.m_inFirstName.value = this.m_maidStatus.firstName;
  326. ClassData<JobClass.Data> selectedJobClass = this.m_maidStatus.selectedJobClass;
  327. if (selectedJobClass != null)
  328. {
  329. this.m_lMaidClassName.text = selectedJobClass.data.drawName;
  330. this.m_lMaidClassLevel.text = selectedJobClass.level.ToString();
  331. this.m_lMaidClassExp.text = selectedJobClass.cur_exp.ToString();
  332. this.m_lMaidClassRequiredExp.text = selectedJobClass.next_exp.ToString();
  333. }
  334. ClassData<YotogiClass.Data> selectedYotogiClass = this.m_maidStatus.selectedYotogiClass;
  335. if (selectedYotogiClass != null)
  336. {
  337. this.m_lYotogiClassName.text = selectedYotogiClass.data.drawName;
  338. this.m_lYotogiClassLevel.text = selectedYotogiClass.level.ToString();
  339. this.m_lYotogiClassExp.text = selectedYotogiClass.cur_exp.ToString();
  340. this.m_lYotogiClassRequiredExp.text = selectedYotogiClass.next_exp.ToString();
  341. }
  342. this.m_lHeight.text = this.m_maidStatus.body.height.ToString();
  343. this.m_lWeight.text = this.m_maidStatus.body.weight.ToString();
  344. this.m_lBust.text = this.m_maidStatus.body.bust.ToString();
  345. this.m_lWaist.text = this.m_maidStatus.body.waist.ToString();
  346. this.m_lHip.text = this.m_maidStatus.body.hip.ToString();
  347. this.m_lCup.text = this.m_maidStatus.body.cup;
  348. this.m_lRelation.text = this.GetCondition(this.m_maidStatus.relation);
  349. this.m_lConditionText.text = this.m_maidStatus.conditionText;
  350. this.m_lYotogiPlayCount.text = this.m_maidStatus.playCountYotogi.ToString();
  351. this.m_lOthersPlayCount.text = this.m_maidStatus.playCountNightWork.ToString();
  352. this.m_lHp.text = this.m_maidStatus.maxHp.ToString();
  353. this.m_lLikability.text = this.m_maidStatus.likability.ToString();
  354. this.m_lMind.text = this.m_maidStatus.maxMind.ToString();
  355. this.m_lReception.text = this.m_maidStatus.reception.ToString();
  356. this.m_lCare.text = this.m_maidStatus.care.ToString();
  357. this.m_lStudyRate.text = this.ToPercent(this.m_maidStatus.studyRate).ToString();
  358. this.m_lTeachRate.text = this.ToPercent(this.m_maidStatus.teachRate).ToString();
  359. this.m_lCooking.text = this.m_maidStatus.cooking.ToString();
  360. this.m_lDance.text = this.m_maidStatus.dance.ToString();
  361. this.m_lVocal.text = this.m_maidStatus.vocal.ToString();
  362. this.m_lLovely.text = this.m_maidStatus.lovely.ToString();
  363. this.m_lElegance.text = this.m_maidStatus.elegance.ToString();
  364. this.m_lCharm.text = this.m_maidStatus.charm.ToString();
  365. this.m_lInran.text = this.m_maidStatus.inyoku.ToString();
  366. this.m_lMValue.text = this.m_maidStatus.mvalue.ToString();
  367. this.m_lHentai.text = this.m_maidStatus.hentai.ToString();
  368. this.m_lHousi.text = this.m_maidStatus.housi.ToString();
  369. this.m_lMaidPoint.text = SceneEdit.Instance.maidPoint.ToString();
  370. string drawName = this.m_maidStatus.personal.drawName;
  371. this.m_pPersonal.value = drawName;
  372. this.m_pSexualExperience.value = this.GetSelectOptionNameFromSexualExpe(this.m_maidStatus.seikeiken);
  373. this.m_lProfileComment.text = this.m_maidStatus.profileComment;
  374. this.m_inFreeComment.value = this.m_maidStatus.freeComment;
  375. }
  376. public void SetLastName(string inputText)
  377. {
  378. this.m_maidStatus.lastName = this.AdjustStrLengthIfOver(inputText, 8);
  379. }
  380. public void SetFirstName(string inputText)
  381. {
  382. this.m_maidStatus.firstName = this.AdjustStrLengthIfOver(inputText, 8);
  383. }
  384. public void SetFreeCommnet(string inputText)
  385. {
  386. this.m_maidStatus.freeComment = this.AdjustStrLengthIfOver(inputText, 304);
  387. }
  388. public void SetPersonal(string selectValue)
  389. {
  390. Personal.Data personal;
  391. if (ProfileCtrl.m_dicPersonal.TryGetValue(selectValue, out personal))
  392. {
  393. this.m_maidStatus.SetPersonal(personal);
  394. Debug.Log(string.Concat(new object[]
  395. {
  396. "保存された性格:",
  397. this.m_maidStatus.personal,
  398. " = ",
  399. selectValue
  400. }));
  401. }
  402. }
  403. public void SetSexualExperience(string selectValue)
  404. {
  405. Seikeiken initSeikeiken;
  406. if (ProfileCtrl.m_dicSexualExperience.TryGetValue(selectValue, out initSeikeiken))
  407. {
  408. this.m_maidStatus.seikeiken = (this.m_maidStatus.initSeikeiken = initSeikeiken);
  409. }
  410. }
  411. private string GetSelectOptionNameFromSexualExpe(Seikeiken sexualExperience)
  412. {
  413. foreach (KeyValuePair<string, Seikeiken> keyValuePair in ProfileCtrl.m_dicSexualExperience)
  414. {
  415. if (keyValuePair.Value == sexualExperience)
  416. {
  417. return keyValuePair.Key;
  418. }
  419. }
  420. return null;
  421. }
  422. private string GetContractType(Contract contractType)
  423. {
  424. return EnumConvert.GetString(contractType);
  425. }
  426. private string GetCondition(Relation relation)
  427. {
  428. return EnumConvert.GetString(relation);
  429. }
  430. private string AdjustStrLengthIfOver(string str, int length)
  431. {
  432. if (str.Length > length)
  433. {
  434. str = str.Substring(length);
  435. Debug.LogError(string.Format("入力された文字数が最大文字数を超えています。入力文字={0}, 最大文字数={1}", str, length));
  436. }
  437. return str;
  438. }
  439. private int AdjustIntIfOverRange(int value, int minNumber, int maxNumber)
  440. {
  441. if (value < minNumber)
  442. {
  443. value = minNumber;
  444. Debug.LogError(string.Format("入力された値が許容される最小値より小さいです。入力値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  445. }
  446. else if (value > maxNumber)
  447. {
  448. value = maxNumber;
  449. Debug.LogError(string.Format("入力された値が許容される最大値より大きいです。入力値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  450. }
  451. return value;
  452. }
  453. private void CheckValueRange(int value, int minNumber, int maxNumber)
  454. {
  455. if (value < minNumber || value > maxNumber)
  456. {
  457. Debug.LogError(string.Format("値が不適切です。値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  458. }
  459. }
  460. private bool CheckValueLength(string value, int length)
  461. {
  462. if (value.Length <= length)
  463. {
  464. return true;
  465. }
  466. Debug.LogError(string.Format("値の桁数が不適切です。値={0}, 許容される値の最大桁数={1}", value, length));
  467. return false;
  468. }
  469. public void ChangeCommentTab(string clickTab)
  470. {
  471. if (clickTab == ProfileMgr.CommentTab.ProfileTab.ToString())
  472. {
  473. this.m_bProfileTab.defaultColor = this.activeColor;
  474. this.m_bFreeTab.defaultColor = this.inActiveColor;
  475. this.m_goProfileComment.SetActive(true);
  476. this.m_goFreeComment.SetActive(false);
  477. this.m_goProfileTabSelector.SetActive(true);
  478. this.m_goFreeTabSelector.SetActive(false);
  479. }
  480. else if (clickTab == ProfileMgr.CommentTab.FreeTab.ToString())
  481. {
  482. this.m_bProfileTab.defaultColor = this.inActiveColor;
  483. this.m_bFreeTab.defaultColor = this.activeColor;
  484. this.m_goProfileComment.SetActive(false);
  485. this.m_goFreeComment.SetActive(true);
  486. this.m_goProfileTabSelector.SetActive(false);
  487. this.m_goFreeTabSelector.SetActive(true);
  488. }
  489. }
  490. private bool NotExist<K, V>(Dictionary<K, V> dic)
  491. {
  492. return dic == null || dic.Count == 0;
  493. }
  494. public void CreateMaidSkillViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  495. {
  496. this.m_dicProfileLabel = dicProfileLabel;
  497. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.MaidSkill, this.m_goMaidSkillParent);
  498. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.MaidSkill);
  499. this.AdjustTargetPosition(this.m_goMaidSkillParent, this.m_maidSkillScrollView);
  500. }
  501. public void CreateCharacterViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  502. {
  503. this.m_dicProfileLabel = dicProfileLabel;
  504. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.Character, this.m_goCharacterParent);
  505. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.Character);
  506. this.AdjustTargetPosition(this.m_goCharacterParent, this.m_characterScrollView);
  507. }
  508. public void CreatePropensityViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  509. {
  510. this.m_dicProfileLabel = dicProfileLabel;
  511. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.Propensity, this.m_goPropensityParent);
  512. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.Propensity);
  513. this.AdjustTargetPosition(this.m_goPropensityParent, this.m_propensityScrollView);
  514. }
  515. public void CreateYotogiSkill(Dictionary<string, ProfileCtrl.ProfileYotogiSkillUnit> dicYotogiSkill)
  516. {
  517. this.m_dicYotogiSkill = dicYotogiSkill;
  518. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.YotogiSkill, this.m_goYotogiSkillParent);
  519. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.YotogiSkill);
  520. this.AdjustTargetPosition(this.m_goYotogiSkillParent, this.m_yotogiSkillScrollView);
  521. }
  522. private void CreateProfileItemInViewer(ProfileMgr.UpperButtonType btnType, GameObject goParent)
  523. {
  524. this.ClearExistChildGameObject(goParent);
  525. GameObject gameObject = null;
  526. switch (btnType)
  527. {
  528. case ProfileMgr.UpperButtonType.MaidSkill:
  529. case ProfileMgr.UpperButtonType.Character:
  530. case ProfileMgr.UpperButtonType.Propensity:
  531. {
  532. gameObject = this.GetPrefabs(this.m_goProfileLabelUnitPrefab, "SceneEdit/Profile/Prefab/ProfileLabelUnit");
  533. List<ProfileCtrl.ProfileLabelUnit> list = new List<ProfileCtrl.ProfileLabelUnit>();
  534. foreach (KeyValuePair<string, ProfileCtrl.ProfileLabelUnit> keyValuePair in this.m_dicProfileLabel)
  535. {
  536. list.Add(keyValuePair.Value);
  537. }
  538. list.Sort((ProfileCtrl.ProfileLabelUnit a, ProfileCtrl.ProfileLabelUnit b) => int.Parse(a.m_id) - int.Parse(b.m_id));
  539. for (int i = 0; i < list.Count; i++)
  540. {
  541. GameObject gameObject2 = UnityEngine.Object.Instantiate<GameObject>(gameObject);
  542. this.SetTransformInfo(gameObject2, goParent);
  543. UILabel component = UTY.GetChildObject(gameObject2, "Parameter", false).GetComponent<UILabel>();
  544. component.text = list[i].m_parameter;
  545. }
  546. this.m_goProfileLabelUnitPrefab = gameObject;
  547. break;
  548. }
  549. case ProfileMgr.UpperButtonType.YotogiSkill:
  550. gameObject = this.GetPrefabs(this.m_goYotogiSkillUnitPrefab, "SceneEdit/Profile/Prefab/YotogiSkillUnit");
  551. foreach (KeyValuePair<string, ProfileCtrl.ProfileYotogiSkillUnit> keyValuePair2 in this.m_dicYotogiSkill)
  552. {
  553. GameObject gameObject3 = UnityEngine.Object.Instantiate<GameObject>(gameObject);
  554. this.SetTransformInfo(gameObject3, goParent);
  555. UILabel component2 = UTY.GetChildObject(gameObject3, "Number/Value", false).GetComponent<UILabel>();
  556. component2.text = keyValuePair2.Value.m_number;
  557. UILabel component3 = UTY.GetChildObject(gameObject3, "SkillName/Value", false).GetComponent<UILabel>();
  558. component3.text = keyValuePair2.Value.m_skillName;
  559. UISprite component4 = UTY.GetChildObject(gameObject3, "LevelOfAchievement/Icon", false).GetComponent<UISprite>();
  560. component4.spriteName = this.m_dicSpriteName[keyValuePair2.Value.m_levelOfAchievement];
  561. }
  562. this.m_goYotogiSkillUnitPrefab = gameObject;
  563. break;
  564. }
  565. }
  566. private void SetTransformInfo(GameObject copyPrefabs, GameObject goParent)
  567. {
  568. copyPrefabs.transform.parent = goParent.transform;
  569. copyPrefabs.transform.localScale = Vector3.one;
  570. copyPrefabs.transform.localPosition = Vector3.zero;
  571. copyPrefabs.transform.rotation = Quaternion.identity;
  572. }
  573. private GameObject GetPrefabs(GameObject prefabs, string prefabsPath)
  574. {
  575. if (prefabs == null)
  576. {
  577. prefabs = (Resources.Load(prefabsPath) as GameObject);
  578. if (prefabs == null)
  579. {
  580. Debug.LogError(string.Format("ロードされるプレハブが見つかりませんでした。パス={0}", prefabsPath));
  581. }
  582. }
  583. return prefabs;
  584. }
  585. private void AdjustTargetPosition(GameObject go, UIScrollView scrollView)
  586. {
  587. go.GetComponent<UIGrid>().Reposition();
  588. scrollView.ResetPosition();
  589. }
  590. private void AdjustTargetPositionGridAndTable(GameObject goGrid, GameObject goTable, UIScrollView scrollView)
  591. {
  592. goGrid.GetComponent<UIGrid>().Reposition();
  593. goTable.GetComponent<UITable>().Reposition();
  594. scrollView.ResetPosition();
  595. }
  596. private void ClearExistChildGameObject(GameObject parent)
  597. {
  598. IEnumerator enumerator = parent.transform.GetEnumerator();
  599. try
  600. {
  601. while (enumerator.MoveNext())
  602. {
  603. object obj = enumerator.Current;
  604. Transform transform = (Transform)obj;
  605. UnityEngine.Object.Destroy(transform.gameObject);
  606. }
  607. }
  608. finally
  609. {
  610. IDisposable disposable;
  611. if ((disposable = (enumerator as IDisposable)) != null)
  612. {
  613. disposable.Dispose();
  614. }
  615. }
  616. parent.transform.DetachChildren();
  617. }
  618. private int ToPercent(int number)
  619. {
  620. return (int)Math.Floor((double)(number / 10));
  621. }
  622. public void OnDisable()
  623. {
  624. if (!this.m_bInited)
  625. {
  626. return;
  627. }
  628. this.SetFirstName(this.m_inFirstName.value);
  629. this.SetLastName(this.m_inLastName.value);
  630. this.SetFreeCommnet(this.m_inFreeComment.value);
  631. }
  632. public void UpdateProfileData(bool updateYotogiSkill)
  633. {
  634. if (this.m_enabledInput)
  635. {
  636. this.m_maidStatus.mainChara = !this.m_enabledPersonalityInput;
  637. foreach (int featureId in this.m_maidStatus.features.GetKeyArray())
  638. {
  639. this.m_maidStatus.RemoveFeature(featureId);
  640. }
  641. List<Feature.Data> allDatas = Feature.GetAllDatas(true);
  642. foreach (Personal.Data.LearnFeature learnFeature in this.m_maidStatus.personal.acquisitionFeatureList)
  643. {
  644. if (learnFeature.isLearnPossible(this.m_maidStatus))
  645. {
  646. this.m_maidStatus.AddFeature(learnFeature.feature);
  647. }
  648. }
  649. AbstractClassData.ClassType classTypeFlags = AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New | AbstractClassData.ClassType.Old;
  650. this.m_maidStatus.yotogiClass.Clear();
  651. foreach (YotogiClass.Data data in this.m_maidStatus.yotogiClass.GetLearnPossibleClassDatas(false, classTypeFlags))
  652. {
  653. if (GameMain.Instance.CharacterMgr.status.IsYotogiClassOpenFlag(data.id))
  654. {
  655. this.m_maidStatus.yotogiClass.Add(data.id, false, true);
  656. }
  657. }
  658. int id = this.m_maidStatus.selectedJobClass.data.id;
  659. HashSet<int> hashSet = new HashSet<int>();
  660. foreach (KeyValuePair<int, ClassData<JobClass.Data>> keyValuePair in this.m_maidStatus.jobClass.GetAllDatas())
  661. {
  662. hashSet.Add(keyValuePair.Key);
  663. }
  664. HashSet<int> hashSet2 = new HashSet<int>();
  665. foreach (JobClass.Data data2 in this.m_maidStatus.jobClass.GetLearnPossibleClassDatas(false, classTypeFlags))
  666. {
  667. if (GameMain.Instance.CharacterMgr.status.IsJobClassOpenFlag(data2.id))
  668. {
  669. hashSet2.Add(data2.id);
  670. }
  671. }
  672. HashSet<int> hashSet3 = new HashSet<int>();
  673. foreach (int item in hashSet)
  674. {
  675. if (!hashSet2.Contains(item))
  676. {
  677. hashSet3.Add(item);
  678. }
  679. }
  680. HashSet<int> hashSet4 = new HashSet<int>();
  681. foreach (int item2 in hashSet2)
  682. {
  683. if (!hashSet.Contains(item2))
  684. {
  685. hashSet4.Add(item2);
  686. }
  687. }
  688. foreach (int id2 in hashSet3)
  689. {
  690. this.m_maidStatus.jobClass.Remove(id2, true);
  691. }
  692. int num = -1;
  693. foreach (int num2 in hashSet4)
  694. {
  695. this.m_maidStatus.jobClass.Add(num2, false, true);
  696. num = ((num >= num2) ? num : num2);
  697. }
  698. if (num != -1)
  699. {
  700. this.m_maidStatus.ChangeJobClass(num);
  701. }
  702. if (updateYotogiSkill)
  703. {
  704. this.m_maidStatus.yotogiSkill.Clear();
  705. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this.m_maidStatus);
  706. foreach (Skill.Data data3 in learnPossibleSkills)
  707. {
  708. this.m_maidStatus.yotogiSkill.Add(data3.id);
  709. }
  710. }
  711. this.m_maidStatus.UpdateClassBonusStatus();
  712. this.m_maidStatus.sexPlayNumberOfPeople = MaidProfile.UpdateInitPlayNumber(this.m_maidStatus.maid);
  713. }
  714. this.m_maidStatus.UpdateBodyParam();
  715. this.m_maidStatus.profileComment = MaidProfile.Create(this.m_maidStatus.maid, !this.m_enabledInput);
  716. }
  717. private Status m_maidStatus;
  718. private ProfileCtrl.ProfileAttribute m_profileAttribute;
  719. private GameObject m_goProfilePanel;
  720. private GameObject m_goProfileComment;
  721. private GameObject m_goFreeComment;
  722. private GameObject m_goProfileTabSelector;
  723. private GameObject m_goFreeTabSelector;
  724. private GameObject m_goProfileLabelUnitPrefab;
  725. private GameObject m_goYotogiSkillUnitPrefab;
  726. private GameObject m_goMaidPointTitleAndFrame;
  727. private GameObject m_goMaidSkillParent;
  728. private GameObject m_goCharacterParent;
  729. private GameObject m_goPropensityParent;
  730. private GameObject m_goYotogiSkillParent;
  731. private GameObject m_goErogenousZoneParent;
  732. private GameObject m_goMaidSkillViewer;
  733. private GameObject m_goCharacterViewer;
  734. private GameObject m_goPropensityViewer;
  735. private GameObject m_goYotogiSkillViewer;
  736. private GameObject m_goPersonalSelectorIcon;
  737. private GameObject m_goSexualExperienceSelectorIcon;
  738. private UIScrollView m_maidSkillScrollView;
  739. private UIScrollView m_characterScrollView;
  740. private UIScrollView m_propensityScrollView;
  741. private UIScrollView m_yotogiSkillScrollView;
  742. private UIScrollView m_attributeScrollView;
  743. private UILabel m_lContractType;
  744. private UILabel m_lMaidClassName;
  745. private UILabel m_lMaidClassLevel;
  746. private UILabel m_lMaidClassExp;
  747. private UILabel m_lMaidClassRequiredExp;
  748. private UILabel m_lYotogiClassName;
  749. private UILabel m_lYotogiClassLevel;
  750. private UILabel m_lYotogiClassExp;
  751. private UILabel m_lYotogiClassRequiredExp;
  752. private UILabel m_lHeight;
  753. private UILabel m_lWeight;
  754. private UILabel m_lBust;
  755. private UILabel m_lCup;
  756. private UILabel m_lWaist;
  757. private UILabel m_lHip;
  758. private UILabel m_lRelation;
  759. private UILabel m_lConditionText;
  760. private UILabel m_lYotogiPlayCount;
  761. private UILabel m_lOthersPlayCount;
  762. private UILabel m_lHp;
  763. private UILabel m_lLikability;
  764. private UILabel m_lMind;
  765. private UILabel m_lReception;
  766. private UILabel m_lCare;
  767. private UILabel m_lStudyRate;
  768. private UILabel m_lTeachRate;
  769. private UILabel m_lCooking;
  770. private UILabel m_lDance;
  771. private UILabel m_lVocal;
  772. private UILabel m_lLovely;
  773. private UILabel m_lElegance;
  774. private UILabel m_lCharm;
  775. private UILabel m_lInran;
  776. private UILabel m_lMValue;
  777. private UILabel m_lHentai;
  778. private UILabel m_lHousi;
  779. private UILabel m_lMaidPoint;
  780. private UILabel m_lProfileComment;
  781. private UIInput m_inFreeComment;
  782. private UIInput m_inFirstName;
  783. private UIInput m_inLastName;
  784. private UIButton m_buFirstName;
  785. private UIButton m_buLastName;
  786. private UIPopupList m_pPersonal;
  787. private UILabel m_lPersonal;
  788. private UIPopupList m_pSexualExperience;
  789. private UIButton m_bProfileTab;
  790. private UIButton m_bFreeTab;
  791. private BoxCollider m_clFirstName;
  792. private BoxCollider m_clLastName;
  793. private BoxCollider m_clPersonal;
  794. private BoxCollider m_clSexualExperience;
  795. private static Dictionary<string, Personal.Data> m_dicPersonal;
  796. private static Dictionary<string, Seikeiken> m_dicSexualExperience;
  797. private Dictionary<ProfileMgr.UpperButtonType, GameObject> m_dicSubViewer;
  798. private Dictionary<ProfileMgr.UpperButtonType, ProfileCtrl.UpperButton> m_dicUpperBtn;
  799. private Dictionary<string, ProfileCtrl.ProfileLabelUnit> m_dicProfileLabel;
  800. private Dictionary<string, ProfileCtrl.ProfileYotogiSkillUnit> m_dicYotogiSkill;
  801. private Dictionary<ProfileCtrl.LevelOfAchievement, string> m_dicSpriteName;
  802. private bool m_bInited;
  803. private Color activeColor;
  804. private Color inActiveColor;
  805. private const int MAX_NAME_LENGTH = 8;
  806. private const int MAX_FREE_COMMENT_LENGTH = 304;
  807. private const int MAX_EROGENOUSZONE_UNIT = 7;
  808. private const int MAX_ATTRIBUTE_UNIT = 10;
  809. private const int DENOMINATOR = 10;
  810. private const string MAID_SKILL_UNIT_PARENT_PATH = "SubWindows/MaidSkillViewer/Contents/MaidSkillUnitParent";
  811. private const string CHARACTER_UNIT_PARENT_PATH = "SubWindows/CharacterViewer/Contents/CharacterUnitParent";
  812. private const string PROPENSITY_UNIT_PARENT_PATH = "SubWindows/PropensityViewer/Contents/CharacterUnitParent";
  813. private const string YOTOGI_SKILL_UNIT_PARENT_PATH = "SubWindows/YotogiSkillViewer/Contents/YotogiSkillUnitParent";
  814. private const string ATTRIBUTE_UNIT_PARENT_PATH = "SubWindows/AttributeViewer/Contents/Attribute/AttributeUnitParent";
  815. private const string EROGENOUS_ZONE_UNIT_PARENT_PATH = "SubWindows/AttributeViewer/Contents/ErogenousZone/ErogenousZoneParent";
  816. private const string PROFILE_LABEL_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/ProfileLabelUnit";
  817. private const string PROFILE_YOTOGI_SKILL_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/YotogiSkillUnit";
  818. private const string PROFILE_ATTRIBUTE_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/AttributeUnit";
  819. private const string PROFILE_EROGENOUS_ZONE_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/ErogenousZoneUnit";
  820. private float initMaidPointUIPosX;
  821. public enum LevelOfAchievement
  822. {
  823. level_1,
  824. level_2,
  825. level_3,
  826. level_4
  827. }
  828. private class UpperButton
  829. {
  830. public ProfileMgr.UpperButtonType m_name;
  831. public GameObject m_goSelectCursor;
  832. public UIButton m_btnButton;
  833. }
  834. public class ProfileLabelUnit
  835. {
  836. public string m_id;
  837. public string m_parameter;
  838. }
  839. public class ProfileYotogiSkillUnit
  840. {
  841. public string m_id;
  842. public string m_number;
  843. public string m_skillName;
  844. public ProfileCtrl.LevelOfAchievement m_levelOfAchievement;
  845. }
  846. public class ProfileAttribute
  847. {
  848. public ProfileAttribute()
  849. {
  850. this.m_listAttributeUnitName = new List<string>();
  851. }
  852. public List<string> m_listAttributeUnitName;
  853. }
  854. public class ErogenousZoneUnit
  855. {
  856. public string m_category;
  857. public int m_PercentNumber;
  858. }
  859. }