ProfileCtrl.cs 40 KB

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