ProfileCtrl.cs 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038
  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. this.m_lMaidClassName.gameObject.GetComponent<Localize>().SetTerm(selectedJobClass.data.termName);
  335. this.m_lMaidClassLevel.text = selectedJobClass.level.ToString();
  336. this.m_lMaidClassExp.text = selectedJobClass.cur_exp.ToString();
  337. this.m_lMaidClassRequiredExp.text = selectedJobClass.next_exp.ToString();
  338. }
  339. ClassData<YotogiClass.Data> selectedYotogiClass = this.m_maidStatus.selectedYotogiClass;
  340. if (selectedYotogiClass != null)
  341. {
  342. this.m_lYotogiClassName.text = selectedYotogiClass.data.drawName;
  343. this.m_lYotogiClassLevel.text = selectedYotogiClass.level.ToString();
  344. this.m_lYotogiClassExp.text = selectedYotogiClass.cur_exp.ToString();
  345. this.m_lYotogiClassRequiredExp.text = selectedYotogiClass.next_exp.ToString();
  346. }
  347. this.m_lHeight.text = this.m_maidStatus.body.height.ToString();
  348. this.m_lWeight.text = this.m_maidStatus.body.weight.ToString();
  349. this.m_lBust.text = this.m_maidStatus.body.bust.ToString();
  350. this.m_lWaist.text = this.m_maidStatus.body.waist.ToString();
  351. this.m_lHip.text = this.m_maidStatus.body.hip.ToString();
  352. this.m_lCup.text = this.m_maidStatus.body.cup;
  353. this.m_lRelation.GetComponent<Localize>().SetTerm(this.GetCondition(this.m_maidStatus.relation));
  354. this.m_lConditionText.GetComponent<Localize>().SetTerm(this.m_maidStatus.conditionTermText);
  355. this.m_lYotogiPlayCount.text = this.m_maidStatus.playCountYotogi.ToString();
  356. this.m_lOthersPlayCount.text = this.m_maidStatus.playCountNightWork.ToString();
  357. this.m_lHp.text = this.m_maidStatus.maxHp.ToString();
  358. this.m_lLikability.text = this.m_maidStatus.likability.ToString();
  359. this.m_lMind.text = this.m_maidStatus.maxMind.ToString();
  360. this.m_lReception.text = this.m_maidStatus.reception.ToString();
  361. this.m_lCare.text = this.m_maidStatus.care.ToString();
  362. this.m_lStudyRate.text = this.ToPercent(this.m_maidStatus.studyRate).ToString();
  363. this.m_lTeachRate.text = this.ToPercent(this.m_maidStatus.teachRate).ToString();
  364. this.m_lCooking.text = this.m_maidStatus.cooking.ToString();
  365. this.m_lDance.text = this.m_maidStatus.dance.ToString();
  366. this.m_lVocal.text = this.m_maidStatus.vocal.ToString();
  367. this.m_lLovely.text = this.m_maidStatus.lovely.ToString();
  368. this.m_lElegance.text = this.m_maidStatus.elegance.ToString();
  369. this.m_lCharm.text = this.m_maidStatus.charm.ToString();
  370. this.m_lInran.text = this.m_maidStatus.inyoku.ToString();
  371. this.m_lMValue.text = this.m_maidStatus.mvalue.ToString();
  372. this.m_lHentai.text = this.m_maidStatus.hentai.ToString();
  373. this.m_lHousi.text = this.m_maidStatus.housi.ToString();
  374. this.m_lMaidPoint.text = SceneEdit.Instance.maidPoint.ToString();
  375. foreach (KeyValuePair<string, Personal.Data> keyValuePair in ProfileCtrl.m_dicPersonal)
  376. {
  377. if (this.m_maidStatus.personal.uniqueName == keyValuePair.Value.uniqueName)
  378. {
  379. this.m_pPersonal.value = keyValuePair.Key;
  380. break;
  381. }
  382. }
  383. this.m_pSexualExperience.value = this.GetSelectOptionNameFromSexualExpe(this.m_maidStatus.seikeiken);
  384. this.m_lProfileComment.text = this.m_maidStatus.profileComment;
  385. this.m_inFreeComment.value = this.m_maidStatus.freeComment;
  386. }
  387. public void SetLastName(string inputText)
  388. {
  389. this.m_maidStatus.lastName = this.AdjustStrLengthIfOver(inputText, 8);
  390. }
  391. public void SetFirstName(string inputText)
  392. {
  393. this.m_maidStatus.firstName = this.AdjustStrLengthIfOver(inputText, 8);
  394. }
  395. public void SetFreeCommnet(string inputText)
  396. {
  397. this.m_maidStatus.freeComment = this.AdjustStrLengthIfOver(inputText, 304);
  398. }
  399. public void SetPersonal(string selectValue)
  400. {
  401. Personal.Data personal;
  402. if (ProfileCtrl.m_dicPersonal.TryGetValue(selectValue, out personal))
  403. {
  404. this.m_maidStatus.SetPersonal(personal);
  405. Debug.Log(string.Concat(new object[]
  406. {
  407. "保存された性格:",
  408. this.m_maidStatus.personal,
  409. " = ",
  410. selectValue
  411. }));
  412. }
  413. }
  414. public void SetSexualExperience(string selectValue)
  415. {
  416. Seikeiken[] array = new Seikeiken[]
  417. {
  418. Seikeiken.No_No,
  419. Seikeiken.Yes_No,
  420. Seikeiken.No_Yes,
  421. Seikeiken.Yes_Yes
  422. };
  423. foreach (Seikeiken seikeiken in array)
  424. {
  425. if (EnumConvert.GetTerm(seikeiken) == selectValue)
  426. {
  427. Seikeiken initSeikeiken = Seikeiken.No_No;
  428. if (ProfileCtrl.m_dicSexualExperience.TryGetValue(EnumConvert.GetString(seikeiken), out initSeikeiken))
  429. {
  430. this.m_maidStatus.seikeiken = (this.m_maidStatus.initSeikeiken = initSeikeiken);
  431. }
  432. break;
  433. }
  434. }
  435. }
  436. private string GetSelectOptionNameFromSexualExpe(Seikeiken sexualExperience)
  437. {
  438. foreach (KeyValuePair<string, Seikeiken> keyValuePair in ProfileCtrl.m_dicSexualExperience)
  439. {
  440. if (keyValuePair.Value == sexualExperience)
  441. {
  442. return EnumConvert.GetTerm(keyValuePair.Value);
  443. }
  444. }
  445. return null;
  446. }
  447. private string GetContractType(Contract contractType)
  448. {
  449. return EnumConvert.GetTerm(contractType);
  450. }
  451. private string GetCondition(Relation relation)
  452. {
  453. return EnumConvert.GetTerm(relation);
  454. }
  455. private string AdjustStrLengthIfOver(string str, int length)
  456. {
  457. if (str.Length > length)
  458. {
  459. str = str.Substring(length);
  460. Debug.LogError(string.Format("入力された文字数が最大文字数を超えています。入力文字={0}, 最大文字数={1}", str, length));
  461. }
  462. return str;
  463. }
  464. private int AdjustIntIfOverRange(int value, int minNumber, int maxNumber)
  465. {
  466. if (value < minNumber)
  467. {
  468. value = minNumber;
  469. Debug.LogError(string.Format("入力された値が許容される最小値より小さいです。入力値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  470. }
  471. else if (value > maxNumber)
  472. {
  473. value = maxNumber;
  474. Debug.LogError(string.Format("入力された値が許容される最大値より大きいです。入力値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  475. }
  476. return value;
  477. }
  478. private void CheckValueRange(int value, int minNumber, int maxNumber)
  479. {
  480. if (value < minNumber || value > maxNumber)
  481. {
  482. Debug.LogError(string.Format("値が不適切です。値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  483. }
  484. }
  485. private bool CheckValueLength(string value, int length)
  486. {
  487. if (value.Length <= length)
  488. {
  489. return true;
  490. }
  491. Debug.LogError(string.Format("値の桁数が不適切です。値={0}, 許容される値の最大桁数={1}", value, length));
  492. return false;
  493. }
  494. public void ChangeCommentTab(string clickTab)
  495. {
  496. if (clickTab == ProfileMgr.CommentTab.ProfileTab.ToString())
  497. {
  498. this.m_bProfileTab.defaultColor = this.activeColor;
  499. this.m_bFreeTab.defaultColor = this.inActiveColor;
  500. this.m_goProfileComment.SetActive(true);
  501. this.m_goFreeComment.SetActive(false);
  502. this.m_goProfileTabSelector.SetActive(true);
  503. this.m_goFreeTabSelector.SetActive(false);
  504. }
  505. else if (clickTab == ProfileMgr.CommentTab.FreeTab.ToString())
  506. {
  507. this.m_bProfileTab.defaultColor = this.inActiveColor;
  508. this.m_bFreeTab.defaultColor = this.activeColor;
  509. this.m_goProfileComment.SetActive(false);
  510. this.m_goFreeComment.SetActive(true);
  511. this.m_goProfileTabSelector.SetActive(false);
  512. this.m_goFreeTabSelector.SetActive(true);
  513. }
  514. }
  515. private bool NotExist<K, V>(Dictionary<K, V> dic)
  516. {
  517. return dic == null || dic.Count == 0;
  518. }
  519. public void CreateMaidSkillViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  520. {
  521. this.m_dicProfileLabel = dicProfileLabel;
  522. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.MaidSkill, this.m_goMaidSkillParent);
  523. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.MaidSkill);
  524. this.AdjustTargetPosition(this.m_goMaidSkillParent, this.m_maidSkillScrollView);
  525. }
  526. public void CreateCharacterViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  527. {
  528. this.m_dicProfileLabel = dicProfileLabel;
  529. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.Character, this.m_goCharacterParent);
  530. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.Character);
  531. this.AdjustTargetPosition(this.m_goCharacterParent, this.m_characterScrollView);
  532. }
  533. public void CreatePropensityViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  534. {
  535. this.m_dicProfileLabel = dicProfileLabel;
  536. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.Propensity, this.m_goPropensityParent);
  537. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.Propensity);
  538. this.AdjustTargetPosition(this.m_goPropensityParent, this.m_propensityScrollView);
  539. }
  540. public void CreateYotogiSkill(Dictionary<string, ProfileCtrl.ProfileYotogiSkillUnit> dicYotogiSkill)
  541. {
  542. this.m_dicYotogiSkill = dicYotogiSkill;
  543. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.YotogiSkill, this.m_goYotogiSkillParent);
  544. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.YotogiSkill);
  545. this.AdjustTargetPosition(this.m_goYotogiSkillParent, this.m_yotogiSkillScrollView);
  546. }
  547. private void CreateProfileItemInViewer(ProfileMgr.UpperButtonType btnType, GameObject goParent)
  548. {
  549. this.ClearExistChildGameObject(goParent);
  550. GameObject gameObject = null;
  551. switch (btnType)
  552. {
  553. case ProfileMgr.UpperButtonType.MaidSkill:
  554. case ProfileMgr.UpperButtonType.Character:
  555. case ProfileMgr.UpperButtonType.Propensity:
  556. {
  557. gameObject = this.GetPrefabs(this.m_goProfileLabelUnitPrefab, "SceneEdit/Profile/Prefab/ProfileLabelUnit");
  558. List<ProfileCtrl.ProfileLabelUnit> list = new List<ProfileCtrl.ProfileLabelUnit>();
  559. foreach (KeyValuePair<string, ProfileCtrl.ProfileLabelUnit> keyValuePair in this.m_dicProfileLabel)
  560. {
  561. list.Add(keyValuePair.Value);
  562. }
  563. list.Sort((ProfileCtrl.ProfileLabelUnit a, ProfileCtrl.ProfileLabelUnit b) => int.Parse(a.m_id) - int.Parse(b.m_id));
  564. for (int i = 0; i < list.Count; i++)
  565. {
  566. GameObject gameObject2 = UnityEngine.Object.Instantiate<GameObject>(gameObject);
  567. this.SetTransformInfo(gameObject2, goParent);
  568. UILabel component = UTY.GetChildObject(gameObject2, "Parameter", false).GetComponent<UILabel>();
  569. component.text = list[i].m_parameter;
  570. }
  571. this.m_goProfileLabelUnitPrefab = gameObject;
  572. break;
  573. }
  574. case ProfileMgr.UpperButtonType.YotogiSkill:
  575. gameObject = this.GetPrefabs(this.m_goYotogiSkillUnitPrefab, "SceneEdit/Profile/Prefab/YotogiSkillUnit");
  576. foreach (KeyValuePair<string, ProfileCtrl.ProfileYotogiSkillUnit> keyValuePair2 in this.m_dicYotogiSkill)
  577. {
  578. GameObject gameObject3 = UnityEngine.Object.Instantiate<GameObject>(gameObject);
  579. this.SetTransformInfo(gameObject3, goParent);
  580. UILabel component2 = UTY.GetChildObject(gameObject3, "Number/Value", false).GetComponent<UILabel>();
  581. component2.text = keyValuePair2.Value.m_number;
  582. UILabel component3 = UTY.GetChildObject(gameObject3, "SkillName/Value", false).GetComponent<UILabel>();
  583. component3.text = keyValuePair2.Value.m_skillName;
  584. UISprite component4 = UTY.GetChildObject(gameObject3, "LevelOfAchievement/Icon", false).GetComponent<UISprite>();
  585. component4.spriteName = this.m_dicSpriteName[keyValuePair2.Value.m_levelOfAchievement];
  586. }
  587. this.m_goYotogiSkillUnitPrefab = gameObject;
  588. break;
  589. }
  590. }
  591. private void SetTransformInfo(GameObject copyPrefabs, GameObject goParent)
  592. {
  593. copyPrefabs.transform.parent = goParent.transform;
  594. copyPrefabs.transform.localScale = Vector3.one;
  595. copyPrefabs.transform.localPosition = Vector3.zero;
  596. copyPrefabs.transform.rotation = Quaternion.identity;
  597. }
  598. private GameObject GetPrefabs(GameObject prefabs, string prefabsPath)
  599. {
  600. if (prefabs == null)
  601. {
  602. prefabs = (Resources.Load(prefabsPath) as GameObject);
  603. if (prefabs == null)
  604. {
  605. Debug.LogError(string.Format("ロードされるプレハブが見つかりませんでした。パス={0}", prefabsPath));
  606. }
  607. }
  608. return prefabs;
  609. }
  610. private void AdjustTargetPosition(GameObject go, UIScrollView scrollView)
  611. {
  612. go.GetComponent<UIGrid>().Reposition();
  613. scrollView.ResetPosition();
  614. }
  615. private void AdjustTargetPositionGridAndTable(GameObject goGrid, GameObject goTable, UIScrollView scrollView)
  616. {
  617. goGrid.GetComponent<UIGrid>().Reposition();
  618. goTable.GetComponent<UITable>().Reposition();
  619. scrollView.ResetPosition();
  620. }
  621. private void ClearExistChildGameObject(GameObject parent)
  622. {
  623. IEnumerator enumerator = parent.transform.GetEnumerator();
  624. try
  625. {
  626. while (enumerator.MoveNext())
  627. {
  628. object obj = enumerator.Current;
  629. Transform transform = (Transform)obj;
  630. UnityEngine.Object.Destroy(transform.gameObject);
  631. }
  632. }
  633. finally
  634. {
  635. IDisposable disposable;
  636. if ((disposable = (enumerator as IDisposable)) != null)
  637. {
  638. disposable.Dispose();
  639. }
  640. }
  641. parent.transform.DetachChildren();
  642. }
  643. private int ToPercent(int number)
  644. {
  645. return (int)Math.Floor((double)(number / 10));
  646. }
  647. public void OnDisable()
  648. {
  649. if (!this.m_bInited)
  650. {
  651. return;
  652. }
  653. this.SetFirstName(this.m_inFirstName.value);
  654. this.SetLastName(this.m_inLastName.value);
  655. this.SetFreeCommnet(this.m_inFreeComment.value);
  656. }
  657. public void UpdateProfileData(bool updateYotogiSkill)
  658. {
  659. if (this.m_enabledInput)
  660. {
  661. this.m_maidStatus.mainChara = !this.m_enabledPersonalityInput;
  662. foreach (int featureId in this.m_maidStatus.features.GetKeyArray())
  663. {
  664. this.m_maidStatus.RemoveFeature(featureId);
  665. }
  666. List<Feature.Data> allDatas = Feature.GetAllDatas(true);
  667. foreach (Personal.Data.LearnFeature learnFeature in this.m_maidStatus.personal.acquisitionFeatureList)
  668. {
  669. if (learnFeature.isLearnPossible(this.m_maidStatus))
  670. {
  671. this.m_maidStatus.AddFeature(learnFeature.feature);
  672. }
  673. }
  674. AbstractClassData.ClassType classTypeFlags = AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New | AbstractClassData.ClassType.Old;
  675. this.m_maidStatus.yotogiClass.Clear();
  676. foreach (YotogiClass.Data data in this.m_maidStatus.yotogiClass.GetLearnPossibleClassDatas(false, classTypeFlags))
  677. {
  678. if (GameMain.Instance.CharacterMgr.status.IsYotogiClassOpenFlag(data.id))
  679. {
  680. this.m_maidStatus.yotogiClass.Add(data.id, false, true);
  681. }
  682. }
  683. int id = this.m_maidStatus.selectedJobClass.data.id;
  684. HashSet<int> hashSet = new HashSet<int>();
  685. foreach (KeyValuePair<int, ClassData<JobClass.Data>> keyValuePair in this.m_maidStatus.jobClass.GetAllDatas())
  686. {
  687. hashSet.Add(keyValuePair.Key);
  688. }
  689. HashSet<int> hashSet2 = new HashSet<int>();
  690. foreach (JobClass.Data data2 in this.m_maidStatus.jobClass.GetLearnPossibleClassDatas(false, classTypeFlags))
  691. {
  692. if (GameMain.Instance.CharacterMgr.status.IsJobClassOpenFlag(data2.id))
  693. {
  694. hashSet2.Add(data2.id);
  695. }
  696. }
  697. HashSet<int> hashSet3 = new HashSet<int>();
  698. foreach (int item in hashSet)
  699. {
  700. if (!hashSet2.Contains(item))
  701. {
  702. hashSet3.Add(item);
  703. }
  704. }
  705. HashSet<int> hashSet4 = new HashSet<int>();
  706. foreach (int item2 in hashSet2)
  707. {
  708. if (!hashSet.Contains(item2))
  709. {
  710. hashSet4.Add(item2);
  711. }
  712. }
  713. foreach (int id2 in hashSet3)
  714. {
  715. this.m_maidStatus.jobClass.Remove(id2, true);
  716. }
  717. int num = -1;
  718. foreach (int num2 in hashSet4)
  719. {
  720. this.m_maidStatus.jobClass.Add(num2, false, true);
  721. num = ((num >= num2) ? num : num2);
  722. }
  723. if (num != -1)
  724. {
  725. this.m_maidStatus.ChangeJobClass(num);
  726. }
  727. if (updateYotogiSkill)
  728. {
  729. this.m_maidStatus.yotogiSkill.Clear();
  730. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this.m_maidStatus);
  731. foreach (Skill.Data data3 in learnPossibleSkills)
  732. {
  733. this.m_maidStatus.yotogiSkill.Add(data3.id);
  734. }
  735. }
  736. this.m_maidStatus.UpdateClassBonusStatus();
  737. this.m_maidStatus.sexPlayNumberOfPeople = MaidProfile.UpdateInitPlayNumber(this.m_maidStatus.maid);
  738. }
  739. this.m_maidStatus.UpdateBodyParam();
  740. this.m_maidStatus.profileComment = MaidProfile.Create(this.m_maidStatus.maid, !this.m_enabledInput);
  741. }
  742. private Status m_maidStatus;
  743. private ProfileCtrl.ProfileAttribute m_profileAttribute;
  744. private GameObject m_goProfilePanel;
  745. private GameObject m_goProfileComment;
  746. private GameObject m_goFreeComment;
  747. private GameObject m_goProfileTabSelector;
  748. private GameObject m_goFreeTabSelector;
  749. private GameObject m_goProfileLabelUnitPrefab;
  750. private GameObject m_goYotogiSkillUnitPrefab;
  751. private GameObject m_goMaidPointTitleAndFrame;
  752. private GameObject m_goMaidSkillParent;
  753. private GameObject m_goCharacterParent;
  754. private GameObject m_goPropensityParent;
  755. private GameObject m_goYotogiSkillParent;
  756. private GameObject m_goErogenousZoneParent;
  757. private GameObject m_goMaidSkillViewer;
  758. private GameObject m_goCharacterViewer;
  759. private GameObject m_goPropensityViewer;
  760. private GameObject m_goYotogiSkillViewer;
  761. private GameObject m_goPersonalSelectorIcon;
  762. private GameObject m_goSexualExperienceSelectorIcon;
  763. private UIScrollView m_maidSkillScrollView;
  764. private UIScrollView m_characterScrollView;
  765. private UIScrollView m_propensityScrollView;
  766. private UIScrollView m_yotogiSkillScrollView;
  767. private UIScrollView m_attributeScrollView;
  768. private UILabel m_lContractType;
  769. private UILabel m_lMaidClassName;
  770. private UILabel m_lMaidClassLevel;
  771. private UILabel m_lMaidClassExp;
  772. private UILabel m_lMaidClassRequiredExp;
  773. private UILabel m_lYotogiClassName;
  774. private UILabel m_lYotogiClassLevel;
  775. private UILabel m_lYotogiClassExp;
  776. private UILabel m_lYotogiClassRequiredExp;
  777. private UILabel m_lHeight;
  778. private UILabel m_lWeight;
  779. private UILabel m_lBust;
  780. private UILabel m_lCup;
  781. private UILabel m_lWaist;
  782. private UILabel m_lHip;
  783. private UILabel m_lRelation;
  784. private UILabel m_lConditionText;
  785. private UILabel m_lYotogiPlayCount;
  786. private UILabel m_lOthersPlayCount;
  787. private UILabel m_lHp;
  788. private UILabel m_lLikability;
  789. private UILabel m_lMind;
  790. private UILabel m_lReception;
  791. private UILabel m_lCare;
  792. private UILabel m_lStudyRate;
  793. private UILabel m_lTeachRate;
  794. private UILabel m_lCooking;
  795. private UILabel m_lDance;
  796. private UILabel m_lVocal;
  797. private UILabel m_lLovely;
  798. private UILabel m_lElegance;
  799. private UILabel m_lCharm;
  800. private UILabel m_lInran;
  801. private UILabel m_lMValue;
  802. private UILabel m_lHentai;
  803. private UILabel m_lHousi;
  804. private UILabel m_lMaidPoint;
  805. private UILabel m_lProfileComment;
  806. private UIInput m_inFreeComment;
  807. private UIInput m_inFirstName;
  808. private UIInput m_inLastName;
  809. private UIButton m_buFirstName;
  810. private UIButton m_buLastName;
  811. private UIPopupList m_pPersonal;
  812. private UILabel m_lPersonal;
  813. private UIPopupList m_pSexualExperience;
  814. private UIButton m_bProfileTab;
  815. private UIButton m_bFreeTab;
  816. private BoxCollider m_clFirstName;
  817. private BoxCollider m_clLastName;
  818. private BoxCollider m_clPersonal;
  819. private BoxCollider m_clSexualExperience;
  820. private static Dictionary<string, Personal.Data> m_dicPersonal;
  821. private static Dictionary<string, Seikeiken> m_dicSexualExperience;
  822. private Dictionary<ProfileMgr.UpperButtonType, GameObject> m_dicSubViewer;
  823. private Dictionary<ProfileMgr.UpperButtonType, ProfileCtrl.UpperButton> m_dicUpperBtn;
  824. private Dictionary<string, ProfileCtrl.ProfileLabelUnit> m_dicProfileLabel;
  825. private Dictionary<string, ProfileCtrl.ProfileYotogiSkillUnit> m_dicYotogiSkill;
  826. private Dictionary<ProfileCtrl.LevelOfAchievement, string> m_dicSpriteName;
  827. private bool m_bInited;
  828. private Color activeColor;
  829. private Color inActiveColor;
  830. private const int MAX_NAME_LENGTH = 8;
  831. private const int MAX_FREE_COMMENT_LENGTH = 304;
  832. private const int MAX_EROGENOUSZONE_UNIT = 7;
  833. private const int MAX_ATTRIBUTE_UNIT = 10;
  834. private const int DENOMINATOR = 10;
  835. private const string MAID_SKILL_UNIT_PARENT_PATH = "SubWindows/MaidSkillViewer/Contents/MaidSkillUnitParent";
  836. private const string CHARACTER_UNIT_PARENT_PATH = "SubWindows/CharacterViewer/Contents/CharacterUnitParent";
  837. private const string PROPENSITY_UNIT_PARENT_PATH = "SubWindows/PropensityViewer/Contents/CharacterUnitParent";
  838. private const string YOTOGI_SKILL_UNIT_PARENT_PATH = "SubWindows/YotogiSkillViewer/Contents/YotogiSkillUnitParent";
  839. private const string ATTRIBUTE_UNIT_PARENT_PATH = "SubWindows/AttributeViewer/Contents/Attribute/AttributeUnitParent";
  840. private const string EROGENOUS_ZONE_UNIT_PARENT_PATH = "SubWindows/AttributeViewer/Contents/ErogenousZone/ErogenousZoneParent";
  841. private const string PROFILE_LABEL_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/ProfileLabelUnit";
  842. private const string PROFILE_YOTOGI_SKILL_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/YotogiSkillUnit";
  843. private const string PROFILE_ATTRIBUTE_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/AttributeUnit";
  844. private const string PROFILE_EROGENOUS_ZONE_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/ErogenousZoneUnit";
  845. private float initMaidPointUIPosX;
  846. public enum LevelOfAchievement
  847. {
  848. level_1,
  849. level_2,
  850. level_3,
  851. level_4
  852. }
  853. private class UpperButton
  854. {
  855. public ProfileMgr.UpperButtonType m_name;
  856. public GameObject m_goSelectCursor;
  857. public UIButton m_btnButton;
  858. }
  859. public class ProfileLabelUnit
  860. {
  861. public string m_id;
  862. public string m_parameter;
  863. }
  864. public class ProfileYotogiSkillUnit
  865. {
  866. public string m_id;
  867. public string m_number;
  868. public string m_skillName;
  869. public ProfileCtrl.LevelOfAchievement m_levelOfAchievement;
  870. }
  871. public class ProfileAttribute
  872. {
  873. public ProfileAttribute()
  874. {
  875. this.m_listAttributeUnitName = new List<string>();
  876. }
  877. public List<string> m_listAttributeUnitName;
  878. }
  879. public class ErogenousZoneUnit
  880. {
  881. public string m_category;
  882. public int m_PercentNumber;
  883. }
  884. }