CharacterSelectMain.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Runtime.CompilerServices;
  4. using com.workman.cm3d2.scene.dailyEtc;
  5. using MaidStatus;
  6. using PlayerStatus;
  7. using Schedule;
  8. using UnityEngine;
  9. public class CharacterSelectMain : WfScreenChildren
  10. {
  11. public static bool compatibilityMode
  12. {
  13. get
  14. {
  15. return DailyMgr.IsLegacy;
  16. }
  17. }
  18. public override void Awake()
  19. {
  20. base.Awake();
  21. this.explanatory_label_ = UTY.GetChildObject(base.root_obj, "ExplanatoryText/Value", false).GetComponent<UILabel>();
  22. GameObject childObject = UTY.GetChildObject(base.root_obj, "ButtonParent/Tower/Grid", false);
  23. this.button_dic_.Add("全選択", UTY.GetChildObject(childObject, "全選択", false).GetComponent<UIButton>());
  24. EventDelegate.Add(this.button_dic_["全選択"].onClick, new EventDelegate.Callback(this.OnSelectAllChara));
  25. this.button_dic_.Add("全解除", UTY.GetChildObject(childObject, "全解除", false).GetComponent<UIButton>());
  26. EventDelegate.Add(this.button_dic_["全解除"].onClick, new EventDelegate.Callback(this.OnSelectAllReleaseChara));
  27. this.button_dic_.Add("OK", UTY.GetChildObject(base.root_obj, "ButtonParent/OK", false).GetComponent<UIButton>());
  28. this.button_dic_.Add("Cancel", UTY.GetChildObject(base.root_obj, "ButtonParent/Cancel", false).GetComponent<UIButton>());
  29. this.button_dic_["Cancel"].gameObject.SetActive(false);
  30. foreach (KeyValuePair<string, UIButton> keyValuePair in this.button_dic_)
  31. {
  32. EventDelegate.Add(keyValuePair.Value.onClick, new EventDelegate.Callback(this.OnClickButton));
  33. }
  34. this.chara_select_mgr_ = UTY.GetChildObject(base.root_obj, "CharacterSelectPanel", false).GetComponent<CharacterSelectManager>();
  35. }
  36. protected override void OnCall()
  37. {
  38. this.auto_select_ = false;
  39. this.wait_count_ = 0;
  40. this.loaded_check_maid_.Clear();
  41. this.select_maid_ = null;
  42. this.chara_mgr_ = GameMain.Instance.CharacterMgr;
  43. this.scene_chara_select_ = (base.parent_mgr as SceneCharacterSelect);
  44. NDebug.AssertNull(this.scene_chara_select_);
  45. this.button_dic_["全選択"].gameObject.SetActive(false);
  46. this.button_dic_["全解除"].gameObject.SetActive(false);
  47. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Additional)
  48. {
  49. this.OnCallAdditionalType();
  50. return;
  51. }
  52. for (int i = 0; i < this.chara_mgr_.GetMaidCount(); i++)
  53. {
  54. if (this.chara_mgr_.GetMaid(i) != null)
  55. {
  56. this.chara_mgr_.Deactivate(i, false);
  57. }
  58. }
  59. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Communication)
  60. {
  61. NDebug.Assert("コミュキャラ選択は廃止されました", false);
  62. GameMain.Instance.BgMgr.ChangeBg("Syosai");
  63. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(-2.526511f, 1.715126f, -2.023701f), 7.999995f, new Vector2(-128.2036f, -6.149067f));
  64. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  65. {
  66. List<Maid> list3 = ScheduleAPI.CanCommunicationMaids(true);
  67. for (int m = 0; m < list3.Count; m++)
  68. {
  69. draw_maid_list.Add(list3[m]);
  70. }
  71. });
  72. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  73. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  74. if (this.chara_select_mgr_.maid_list_count == 1)
  75. {
  76. this.auto_select_ = true;
  77. }
  78. if (!this.auto_select_)
  79. {
  80. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  81. }
  82. this.explanatory_label_.text = "コミュニケーションを行うメイドを選択してください。";
  83. }
  84. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Facility)
  85. {
  86. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip)
  87. {
  88. if (!CharacterSelectMain.compatibilityMode)
  89. {
  90. GameMain.Instance.BgMgr.ChangeBg("Theater");
  91. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(12.39468f, 5.495444f, 22.72065f), 0.1f, new Vector2(-6.047941f, 14.65832f));
  92. }
  93. else
  94. {
  95. GameMain.Instance.BgMgr.ChangeBg("Salon");
  96. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(1.485176f, 0.5354422f, 1.606312f), 13.60001f, new Vector2(-208.1436f, -0.869565f));
  97. }
  98. }
  99. else
  100. {
  101. GameMain.Instance.BgMgr.ChangeBg("EmpireClub_Rotary");
  102. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(6.673284f, 3.031431f, 20.00305f), 0.2f, new Vector2(562.5145f, -4.906824f));
  103. }
  104. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  105. {
  106. List<string> chara_guid_stock_list = SceneCharacterSelect.chara_guid_stock_list;
  107. for (int m = 0; m < chara_guid_stock_list.Count; m++)
  108. {
  109. Maid stockMaid2 = GameMain.Instance.CharacterMgr.GetStockMaid(chara_guid_stock_list[m]);
  110. if (stockMaid2 != null)
  111. {
  112. if (!CharacterSelectMain.compatibilityMode)
  113. {
  114. draw_maid_list.Add(stockMaid2);
  115. }
  116. else if (stockMaid2.status.heroineType == HeroineType.Transfer)
  117. {
  118. draw_maid_list.Add(stockMaid2);
  119. }
  120. }
  121. }
  122. });
  123. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  124. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  125. if (this.chara_select_mgr_.maid_list_count == 1 && this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip)
  126. {
  127. this.auto_select_ = true;
  128. }
  129. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi)
  130. {
  131. this.explanatory_label_.text = "夜伽を行うメイドを選択してください。";
  132. }
  133. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip)
  134. {
  135. this.explanatory_label_.text = "Hイベントを行うメイドを選択してください。";
  136. }
  137. else
  138. {
  139. this.explanatory_label_.text = "施設強化を行うメイドを選択してください。";
  140. }
  141. if (!this.auto_select_)
  142. {
  143. if (!CharacterSelectMain.compatibilityMode)
  144. {
  145. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  146. }
  147. else
  148. {
  149. GameMain.Instance.SoundMgr.PlayBGMLegacy("BGM014.ogg", 0.5f, true);
  150. }
  151. }
  152. }
  153. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.CompetitiveShow)
  154. {
  155. if (!CharacterSelectMain.compatibilityMode)
  156. {
  157. GameMain.Instance.BgMgr.ChangeBg("Theater");
  158. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(6.502444f, 1.154878f, 27.09383f), 0.1f, new Vector2(200.2396f, -12.36027f));
  159. }
  160. else
  161. {
  162. GameMain.Instance.BgMgr.ChangeBg("Salon_Day");
  163. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(1.485176f, 0.5354422f, 1.606312f), 13.60001f, new Vector2(-208.1436f, -0.869565f));
  164. }
  165. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  166. {
  167. List<Maid> list3 = new List<Maid>();
  168. CharacterSelectManager.DefaultMaidList(list3);
  169. for (int m = 0; m < list3.Count; m++)
  170. {
  171. if (!CharacterSelectMain.compatibilityMode && (list3[m].status.heroineType == HeroineType.Original || list3[m].status.heroineType == HeroineType.Transfer))
  172. {
  173. draw_maid_list.Add(list3[m]);
  174. }
  175. else if (CharacterSelectMain.compatibilityMode && list3[m].status.heroineType == HeroineType.Transfer)
  176. {
  177. draw_maid_list.Add(list3[m]);
  178. }
  179. }
  180. });
  181. this.chara_select_mgr_.SetCallBackOnMultiSelect(new CharacterSelectManager.CallBackOnMultiSelect(this.OnMultiSelectChara));
  182. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Multiple, this.chara_mgr_.GetStockMaidCount(), false);
  183. this.button_dic_["OK"].isEnabled = false;
  184. if (this.chara_select_mgr_.maid_list_count == 1)
  185. {
  186. Maid[] array = new Maid[1];
  187. List<Maid> list = new List<Maid>();
  188. List<Maid> list2 = new List<Maid>();
  189. CharacterSelectManager.DefaultMaidList(list2);
  190. for (int j = 0; j < list2.Count; j++)
  191. {
  192. if (!CharacterSelectMain.compatibilityMode && list2[j].status.heroineType == HeroineType.Original)
  193. {
  194. list.Add(list2[j]);
  195. }
  196. else if (CharacterSelectMain.compatibilityMode && list2[j].status.heroineType == HeroineType.Transfer)
  197. {
  198. list.Add(list2[j]);
  199. }
  200. }
  201. if (0 < list.Count)
  202. {
  203. array[0] = list[0];
  204. }
  205. if (array[0] != null)
  206. {
  207. this.OnMultiSelectChara(array);
  208. this.auto_select_ = true;
  209. }
  210. }
  211. if (!this.auto_select_)
  212. {
  213. if (!CharacterSelectMain.compatibilityMode)
  214. {
  215. GameMain.Instance.SoundMgr.PlayBGM("BGM006.ogg", 0.5f, true);
  216. }
  217. else
  218. {
  219. GameMain.Instance.SoundMgr.PlayBGMLegacy("BGM021.ogg", 0.5f, true);
  220. }
  221. }
  222. this.button_dic_["全選択"].gameObject.SetActive(true);
  223. this.button_dic_["全解除"].gameObject.SetActive(true);
  224. this.button_dic_["全選択"].isEnabled = true;
  225. this.button_dic_["全解除"].isEnabled = false;
  226. this.explanatory_label_.text = "品評会を行うメイドを選択してください。";
  227. }
  228. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Free)
  229. {
  230. if (!CharacterSelectMain.compatibilityMode)
  231. {
  232. GameMain.Instance.BgMgr.ChangeBg("Theater");
  233. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(12.39468f, 5.495444f, 22.72065f), 0.1f, new Vector2(-6.047941f, 14.65832f));
  234. }
  235. else
  236. {
  237. GameMain.Instance.BgMgr.ChangeBg("Syosai");
  238. }
  239. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  240. {
  241. List<Maid> list3 = new List<Maid>();
  242. CharacterSelectManager.DefaultMaidList(list3);
  243. for (int m = 0; m < list3.Count; m++)
  244. {
  245. if (!CharacterSelectMain.compatibilityMode)
  246. {
  247. draw_maid_list.Add(list3[m]);
  248. }
  249. else if (list3[m].status.heroineType == HeroineType.Transfer)
  250. {
  251. draw_maid_list.Add(list3[m]);
  252. }
  253. }
  254. });
  255. this.explanatory_label_.text = "メイドを選択してください。";
  256. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  257. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  258. if (this.chara_select_mgr_.maid_list_count == 1)
  259. {
  260. this.auto_select_ = true;
  261. }
  262. }
  263. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.TouchCharaSelect)
  264. {
  265. if (GameMain.Instance.CharacterMgr.status.isDaytime)
  266. {
  267. GameMain.Instance.BgMgr.ChangeBg(DailyAPI.dayBg);
  268. }
  269. else
  270. {
  271. GameMain.Instance.BgMgr.ChangeBg(DailyAPI.nightBg);
  272. }
  273. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(1.32781f, 1.400725f, -0.06648348f), 0.1f, new Vector2(214.6109f, 8.136656f));
  274. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  275. {
  276. List<Maid> list3 = new List<Maid>();
  277. CharacterSelectManager.DefaultMaidList(list3);
  278. for (int m = 0; m < list3.Count; m++)
  279. {
  280. if (!CharacterSelectMain.compatibilityMode)
  281. {
  282. draw_maid_list.Add(list3[m]);
  283. }
  284. else if (list3[m].status.heroineType == HeroineType.Transfer)
  285. {
  286. draw_maid_list.Add(list3[m]);
  287. }
  288. }
  289. });
  290. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  291. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  292. if (this.chara_select_mgr_.maid_list_count == 1)
  293. {
  294. this.auto_select_ = true;
  295. }
  296. if (!this.auto_select_)
  297. {
  298. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 0.5f, true);
  299. }
  300. this.explanatory_label_.text = "おさわりを行うメイドを選択してください。";
  301. }
  302. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRComSelect)
  303. {
  304. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  305. {
  306. List<Maid> list3 = new List<Maid>();
  307. CharacterSelectManager.DefaultMaidList(list3);
  308. for (int m = 0; m < list3.Count; m++)
  309. {
  310. if (!CharacterSelectMain.compatibilityMode)
  311. {
  312. draw_maid_list.Add(list3[m]);
  313. }
  314. else if (list3[m].status.heroineType == HeroineType.Transfer)
  315. {
  316. draw_maid_list.Add(list3[m]);
  317. }
  318. }
  319. });
  320. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  321. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  322. if (this.chara_select_mgr_.maid_list_count == 1)
  323. {
  324. this.auto_select_ = true;
  325. }
  326. this.explanatory_label_.text = "バカンスに連れていくメイドを選択してください。";
  327. }
  328. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRKaraokeSelect)
  329. {
  330. CharacterSelectManager characterSelectManager = this.chara_select_mgr_;
  331. if (CharacterSelectMain.<>f__mg$cache0 == null)
  332. {
  333. CharacterSelectMain.<>f__mg$cache0 = new CharacterSelectManager.CallBackMaidList(KaraokeDataManager.GetMaidListKaraoke);
  334. }
  335. characterSelectManager.SetCallBackMaidList(CharacterSelectMain.<>f__mg$cache0);
  336. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  337. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  338. if (this.chara_select_mgr_.maid_list_count == 1)
  339. {
  340. this.auto_select_ = true;
  341. }
  342. this.explanatory_label_.text = "カラオケに連れていくメイドを選択してください。";
  343. }
  344. else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Recollection)
  345. {
  346. if (!CharacterSelectMain.compatibilityMode)
  347. {
  348. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  349. GameMain.Instance.MainCamera.SetFromScriptOnTarget(new Vector3(-0.4103856f, 1.075485f, 0.775088f), 1.6f, new Vector2(321.3178f, 3.478252f));
  350. }
  351. else
  352. {
  353. GameMain.Instance.BgMgr.ChangeBg("Syosai");
  354. }
  355. string text = "recollection_subheroine.nei";
  356. List<int> subMaidList = new List<int>();
  357. using (AFileBase afileBase = GameUty.FileSystem.FileOpen(text))
  358. {
  359. using (CsvParser csvParser = new CsvParser())
  360. {
  361. bool condition = csvParser.Open(afileBase);
  362. NDebug.Assert(condition, text + "\nopen failed.");
  363. for (int k = 1; k < csvParser.max_cell_y; k++)
  364. {
  365. if (csvParser.IsCellToExistData(0, k))
  366. {
  367. int cellAsInteger = csvParser.GetCellAsInteger(0, k);
  368. int cellAsInteger2 = csvParser.GetCellAsInteger(2, k);
  369. subMaidList.Add(cellAsInteger2);
  370. }
  371. }
  372. }
  373. }
  374. this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
  375. {
  376. List<Maid> list3 = new List<Maid>();
  377. CharacterSelectManager.DefaultMaidList(list3);
  378. for (int m = 0; m < list3.Count; m++)
  379. {
  380. Maid maid = list3[m];
  381. if (maid.status.subCharaData == null || subMaidList.Contains(maid.status.subCharaData.id))
  382. {
  383. if (!CharacterSelectMain.compatibilityMode || maid.status.heroineType == HeroineType.Transfer)
  384. {
  385. draw_maid_list.Add(list3[m]);
  386. }
  387. }
  388. }
  389. });
  390. this.explanatory_label_.text = "メイドを選択してください。";
  391. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  392. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  393. if (this.chara_select_mgr_.maid_list_count == 1)
  394. {
  395. this.auto_select_ = true;
  396. }
  397. }
  398. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  399. for (int l = 0; l < characterMgr.GetStockMaidCount(); l++)
  400. {
  401. Maid stockMaid = characterMgr.GetStockMaid(l);
  402. if (stockMaid != null)
  403. {
  404. stockMaid.FaceAnime("通常", 0f, 0);
  405. stockMaid.FaceBlend("無し");
  406. }
  407. }
  408. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  409. }
  410. private void OnCallAdditionalType()
  411. {
  412. Debug.Log("メイドをアクティブ化させるスロット : " + this.scene_chara_select_.select_maid_slot);
  413. CharacterSelectManager characterSelectManager = this.chara_select_mgr_;
  414. if (CharacterSelectMain.<>f__mg$cache1 == null)
  415. {
  416. CharacterSelectMain.<>f__mg$cache1 = new CharacterSelectManager.CallBackMaidList(KaraokeDataManager.GetMaidListAdditional);
  417. }
  418. characterSelectManager.SetCallBackMaidList(CharacterSelectMain.<>f__mg$cache1);
  419. this.chara_select_mgr_.SetCallBackCallBackOnSelect(new CharacterSelectManager.CallBackOnSelect(this.OnSelectChara));
  420. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  421. if (this.chara_select_mgr_.maid_list_count == 1)
  422. {
  423. this.auto_select_ = true;
  424. }
  425. this.explanatory_label_.text = "*メイドの追加呼び出し*";
  426. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  427. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  428. {
  429. Maid stockMaid = characterMgr.GetStockMaid(i);
  430. if (stockMaid != null)
  431. {
  432. stockMaid.FaceAnime("通常", 0f, 0);
  433. stockMaid.FaceBlend("無し");
  434. }
  435. }
  436. }
  437. protected override bool IsCallFadeIn()
  438. {
  439. if (this.auto_select_)
  440. {
  441. base.SetFadeStatus(WfScreenChildren.FadeStatus.Wait);
  442. float fade_time = base.fade_time;
  443. base.SetFadeTime(0f);
  444. this.Finish();
  445. base.SetFadeTime(fade_time);
  446. return false;
  447. }
  448. this.wait_count_++;
  449. return 2 < this.wait_count_;
  450. }
  451. public void SetCancelLabel(string cancel_call_label)
  452. {
  453. this.cancel_call_label_ = cancel_call_label;
  454. this.button_dic_["Cancel"].gameObject.SetActive(!string.IsNullOrEmpty(this.cancel_call_label_));
  455. }
  456. private void OnSelectAllChara()
  457. {
  458. this.chara_select_mgr_.SelectAllMaid();
  459. }
  460. private void OnSelectAllReleaseChara()
  461. {
  462. this.chara_select_mgr_.SelectAllReleaseMaid();
  463. }
  464. private void OnSelectChara(Maid select_maid)
  465. {
  466. this.select_maid_ = select_maid;
  467. }
  468. private void OnSingleDanceSelectChara(Maid select_maid)
  469. {
  470. this.loaded_check_maid_.Clear();
  471. this.loaded_check_maid_.Add(select_maid);
  472. }
  473. private void OnMultiDanceSelectChara(Maid[] maid_array)
  474. {
  475. this.loaded_check_maid_.Clear();
  476. for (int i = 0; i < maid_array.Length; i++)
  477. {
  478. this.loaded_check_maid_.Add(maid_array[i]);
  479. }
  480. }
  481. private void OnMultiSelectChara(Maid[] maid_array)
  482. {
  483. this.loaded_check_maid_.Clear();
  484. bool isEnabled = false;
  485. bool flag = true;
  486. bool flag2 = true;
  487. for (int i = 0; i < maid_array.Length; i++)
  488. {
  489. if (maid_array[i] == null)
  490. {
  491. flag = false;
  492. }
  493. else
  494. {
  495. flag2 = false;
  496. isEnabled = true;
  497. this.loaded_check_maid_.Add(maid_array[i]);
  498. }
  499. }
  500. this.button_dic_["OK"].isEnabled = isEnabled;
  501. this.button_dic_["全選択"].isEnabled = !flag;
  502. this.button_dic_["全解除"].isEnabled = !flag2;
  503. }
  504. private void OnClickButton()
  505. {
  506. string text = string.Empty;
  507. foreach (KeyValuePair<string, UIButton> keyValuePair in this.button_dic_)
  508. {
  509. if (keyValuePair.Value == UIButton.current)
  510. {
  511. text = keyValuePair.Key;
  512. break;
  513. }
  514. }
  515. if (string.IsNullOrEmpty(text))
  516. {
  517. return;
  518. }
  519. if (text == "OK")
  520. {
  521. this.Finish();
  522. }
  523. else if (text == "Cancel")
  524. {
  525. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi)
  526. {
  527. string f_strMsg = "まだ夜伽を実行していないメイドがいます。\n夜伽を終了しますか?";
  528. GameMain.Instance.SysDlg.Show(f_strMsg, SystemDialog.TYPE.OK_CANCEL, delegate
  529. {
  530. GameMain.Instance.SysDlg.Close();
  531. this.select_maid_ = null;
  532. this.scene_chara_select_.move_screen.SetNextLabel(this.cancel_call_label_);
  533. this.Finish();
  534. }, null);
  535. }
  536. else
  537. {
  538. this.select_maid_ = null;
  539. this.scene_chara_select_.move_screen.SetNextLabel(this.cancel_call_label_);
  540. this.Finish();
  541. }
  542. }
  543. }
  544. private void OnOvrCamFree()
  545. {
  546. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
  547. this.Finish();
  548. }
  549. private void OnOvrCamMove()
  550. {
  551. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 1);
  552. this.Finish();
  553. }
  554. public override bool Finish()
  555. {
  556. bool flag = base.Finish();
  557. if (flag && 0 < this.loaded_check_maid_.Count)
  558. {
  559. GameMain.Instance.SoundMgr.StopBGM(1.5f);
  560. }
  561. return flag;
  562. }
  563. protected override void OnFinish()
  564. {
  565. this.button_dic_["Cancel"].gameObject.SetActive(false);
  566. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Communication && this.select_maid_ != null)
  567. {
  568. int noonWorkId = this.select_maid_.status.noonWorkId;
  569. this.loaded_check_maid_.Add(this.select_maid_);
  570. ScheduleData[] scheduleSlot = GameMain.Instance.CharacterMgr.status.scheduleSlot;
  571. for (int i = 0; i < scheduleSlot.Length; i++)
  572. {
  573. if (scheduleSlot[i].maid_guid == this.select_maid_.status.guid)
  574. {
  575. scheduleSlot[i].noon_communication = true;
  576. break;
  577. }
  578. }
  579. if (noonWorkId == ScheduleAPI.GetNoonTrainerWorkId())
  580. {
  581. Maid noonTraineeMaid = ScheduleAPI.GetNoonTraineeMaid();
  582. NDebug.Assert(noonTraineeMaid != null, "研修生を特定できませんでした");
  583. this.loaded_check_maid_.Add(noonTraineeMaid);
  584. }
  585. else if (noonWorkId == ScheduleAPI.GetTraineeWorkId())
  586. {
  587. Maid noonTrainerMaid = ScheduleAPI.GetNoonTrainerMaid();
  588. NDebug.Assert(noonTrainerMaid != null, "研修官を特定できませんでした");
  589. this.loaded_check_maid_.Add(noonTrainerMaid);
  590. }
  591. }
  592. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Yotogi || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Vip || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Facility || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Free || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Recollection)
  593. {
  594. if (this.select_maid_ != null)
  595. {
  596. this.loaded_check_maid_.Add(this.select_maid_);
  597. SceneCharacterSelect.chara_guid_stock_list.Remove(this.select_maid_.status.guid);
  598. }
  599. else
  600. {
  601. SceneCharacterSelect.chara_guid_stock_list.Clear();
  602. }
  603. }
  604. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.CompetitiveShow)
  605. {
  606. CompetitiveShowMgr.check_maid_list.Clear();
  607. SceneCharacterSelect.select_maid_list.Clear();
  608. for (int j = 0; j < this.loaded_check_maid_.Count; j++)
  609. {
  610. SceneCharacterSelect.select_maid_list.Add(this.loaded_check_maid_[j]);
  611. }
  612. this.loaded_check_maid_.Clear();
  613. }
  614. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.TouchCharaSelect && this.select_maid_ != null)
  615. {
  616. this.loaded_check_maid_.Add(this.select_maid_);
  617. }
  618. if ((this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRComSelect || this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.VRKaraokeSelect) && this.select_maid_ != null)
  619. {
  620. this.loaded_check_maid_.Add(this.select_maid_);
  621. }
  622. if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.Additional)
  623. {
  624. this.chara_mgr_.SetActiveMaid(this.select_maid_, this.scene_chara_select_.select_maid_slot);
  625. }
  626. for (int k = 0; k < this.loaded_check_maid_.Count; k++)
  627. {
  628. this.chara_mgr_.SetActiveMaid(this.loaded_check_maid_[k], k);
  629. this.loaded_check_maid_[k].Visible = true;
  630. this.loaded_check_maid_[k].AllProcPropSeqStart();
  631. }
  632. GameMain.Instance.LoadIcon.NextLoadIcontImmediatelyDisplay();
  633. if (this.loaded_check_maid_.Count == 0)
  634. {
  635. base.parent_mgr.CallScreen("Move");
  636. }
  637. }
  638. protected override void OnFadeEnd()
  639. {
  640. if (this.loaded_check_maid_.Count == 0)
  641. {
  642. return;
  643. }
  644. bool flag = true;
  645. for (int i = 0; i < this.loaded_check_maid_.Count; i++)
  646. {
  647. if (this.loaded_check_maid_[i].IsBusy)
  648. {
  649. flag = false;
  650. break;
  651. }
  652. }
  653. if (flag)
  654. {
  655. base.parent_mgr.CallScreen("Move");
  656. this.loaded_check_maid_.Clear();
  657. }
  658. }
  659. private SceneCharacterSelect scene_chara_select_;
  660. private Maid select_maid_;
  661. private CharacterMgr chara_mgr_;
  662. private CharacterSelectManager chara_select_mgr_;
  663. private Dictionary<string, UIButton> button_dic_ = new Dictionary<string, UIButton>();
  664. private List<Maid> loaded_check_maid_ = new List<Maid>();
  665. private UILabel explanatory_label_;
  666. private string cancel_call_label_ = string.Empty;
  667. private int wait_count_;
  668. private bool auto_select_;
  669. private FFNameDialog ovr_dance_cam_dlg_;
  670. [CompilerGenerated]
  671. private static CharacterSelectManager.CallBackMaidList <>f__mg$cache0;
  672. [CompilerGenerated]
  673. private static CharacterSelectManager.CallBackMaidList <>f__mg$cache1;
  674. }