CharacterSelectMain.cs 26 KB

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