ProfileCtrl.cs 39 KB

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