CharacterSelectMain.cs 24 KB

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