CharacterSelectMain.cs 24 KB

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