DanceSelect.cs 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using I2.Loc;
  6. using UnityEngine;
  7. using wf;
  8. public class DanceSelect : WfScreenChildren
  9. {
  10. public static void CreateDanceData()
  11. {
  12. if (DanceSelect.dance_data_list_ != null)
  13. {
  14. return;
  15. }
  16. HashSet<int> enabled_id_list = new HashSet<int>();
  17. Action<string> action = delegate(string file_name)
  18. {
  19. file_name += ".nei";
  20. if (!GameUty.FileSystem.IsExistentFile(file_name))
  21. {
  22. return;
  23. }
  24. using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen(file_name))
  25. {
  26. using (CsvParser csvParser2 = new CsvParser())
  27. {
  28. bool condition2 = csvParser2.Open(afileBase2);
  29. NDebug.Assert(condition2, file_name + "\nopen failed.");
  30. for (int m = 1; m < csvParser2.max_cell_y; m++)
  31. {
  32. if (csvParser2.IsCellToExistData(0, m))
  33. {
  34. int cellAsInteger2 = csvParser2.GetCellAsInteger(0, m);
  35. if (!enabled_id_list.Contains(cellAsInteger2))
  36. {
  37. enabled_id_list.Add(cellAsInteger2);
  38. }
  39. }
  40. }
  41. }
  42. }
  43. };
  44. action("dance_enabled_list");
  45. for (int i = 0; i < GameUty.PathList.Count; i++)
  46. {
  47. action("dance_enabled_list_" + GameUty.PathList[i]);
  48. }
  49. DanceSelect.dance_data_list_ = new List<DanceData>();
  50. using (AFileBase afileBase = GameUty.FileSystem.FileOpen("dance_setting.nei"))
  51. {
  52. using (CsvParser csvParser = new CsvParser())
  53. {
  54. bool condition = csvParser.Open(afileBase);
  55. NDebug.Assert(condition, "file open error[dance_setting.nei]");
  56. for (int j = 1; j < csvParser.max_cell_y; j++)
  57. {
  58. if (csvParser.IsCellToExistData(0, j))
  59. {
  60. int num = 0;
  61. int cellAsInteger = csvParser.GetCellAsInteger(num++, j);
  62. if (enabled_id_list.Contains(cellAsInteger))
  63. {
  64. DanceData danceData = new DanceData();
  65. danceData.ID = cellAsInteger;
  66. danceData.title = csvParser.GetCellAsString(num++, j);
  67. danceData.title = danceData.title.Replace("《改行》", "\n");
  68. danceData.title_font_size = csvParser.GetCellAsInteger(num++, j);
  69. danceData.title_offset_y = csvParser.GetCellAsInteger(num++, j);
  70. danceData.select_chara_num = csvParser.GetCellAsInteger(num++, j);
  71. danceData.scene_name = csvParser.GetCellAsString(num++, j);
  72. danceData.commentary_text = csvParser.GetCellAsString(num++, j);
  73. danceData.commentary_text = danceData.commentary_text.Replace("《改行》", "\n");
  74. danceData.sample_image_name = csvParser.GetCellAsString(num++, j);
  75. danceData.bgm_file_name = csvParser.GetCellAsString(num++, j);
  76. danceData.preset_name = new List<string>();
  77. for (int k = 0; k < danceData.select_chara_num; k++)
  78. {
  79. danceData.preset_name.Add(string.Empty);
  80. }
  81. string cellAsString = csvParser.GetCellAsString(num++, j);
  82. if (!string.IsNullOrEmpty(cellAsString))
  83. {
  84. string[] array = cellAsString.Split(new char[]
  85. {
  86. ','
  87. });
  88. NDebug.Assert(array.Length <= danceData.preset_name.Count, "ダンス[" + danceData.title + "]のプリセット人数設定が\n多すぎます");
  89. int num2 = 0;
  90. while (num2 < danceData.preset_name.Count && num2 < array.Length)
  91. {
  92. danceData.preset_name[num2] = array[num2].Trim();
  93. num2++;
  94. }
  95. }
  96. string cellAsString2 = csvParser.GetCellAsString(num++, j);
  97. if (!string.IsNullOrEmpty(cellAsString2))
  98. {
  99. danceData.scenario_progress = int.Parse(cellAsString2);
  100. }
  101. string cellAsString3 = csvParser.GetCellAsString(num++, j);
  102. if (!string.IsNullOrEmpty(cellAsString3))
  103. {
  104. danceData.Term = (DanceData.DanceTerm)Enum.Parse(typeof(DanceData.DanceTerm), cellAsString3);
  105. }
  106. danceData.AppealCutinName = csvParser.GetCellAsString(num++, j);
  107. danceData.ReversalCutinName = csvParser.GetCellAsString(num++, j);
  108. danceData.danceshow_scene = csvParser.GetCellAsString(num++, j);
  109. danceData.danceshow_image = csvParser.GetCellAsString(num++, j);
  110. string cellAsString4 = csvParser.GetCellAsString(num++, j);
  111. if (!string.IsNullOrEmpty(cellAsString4))
  112. {
  113. foreach (string text in cellAsString4.Split(new char[]
  114. {
  115. ','
  116. }))
  117. {
  118. string s = text.Split(new char[]
  119. {
  120. '='
  121. })[1].Split(new char[]
  122. {
  123. '_'
  124. })[1];
  125. danceData.maid_order.Add(int.Parse(s) - 1);
  126. }
  127. }
  128. string cellAsString5 = csvParser.GetCellAsString(num++, j);
  129. if (cellAsString5 == "ライブステージ")
  130. {
  131. danceData.bgType = DanceData.BgType.LiveStage;
  132. }
  133. else
  134. {
  135. danceData.bgType = ((!(cellAsString5 == "劇場")) ? DanceData.BgType.PoleDance : DanceData.BgType.Theater);
  136. }
  137. danceData.InitialPlayable = csvParser.IsCellToExistData(num++, j);
  138. danceData.IsPlayable = danceData.InitialPlayable;
  139. danceData.RhythmGameCorrespond = (csvParser.GetCellAsString(num++, j) == "◯");
  140. danceData.SubtitleSheetName = csvParser.GetCellAsString(num++, j);
  141. DanceSelect.dance_data_list_.Add(danceData);
  142. }
  143. }
  144. }
  145. }
  146. }
  147. }
  148. public override void Awake()
  149. {
  150. DanceSelect.CreateDanceData();
  151. base.Awake();
  152. if (GameMain.Instance.ScriptMgr.adv_kag.tag_backup.ContainsKey("only_release"))
  153. {
  154. this.m_ExistOnlyRelease = true;
  155. this.m_OnlyRelease = int.Parse(GameMain.Instance.ScriptMgr.adv_kag.tag_backup["only_release"]);
  156. DanceSelect.m_SelectedDance.Clear();
  157. }
  158. this.m_ForceTheater = GameMain.Instance.ScriptMgr.adv_kag.tag_backup.ContainsKey("force_theater");
  159. this.m_ReleaseButton.gameObject.SetActive(false);
  160. EventDelegate.Add(this.OkButton.onClick, new EventDelegate.Callback(this.OnClickOkButton));
  161. EventDelegate.Add(this.CancelButton.onClick, new EventDelegate.Callback(this.OnClickCancelButton));
  162. GameObject gameObject = this.OkButton.transform.parent.gameObject;
  163. this.m_MainButtonPanel = gameObject.GetComponent<UIPanel>();
  164. EventDelegate.Add(this.m_SubOkButton.onClick, new EventDelegate.Callback(this.OnClickOkButton));
  165. EventDelegate.Add(this.m_SubCancelButton.onClick, new EventDelegate.Callback(this.OnClickCancelButton));
  166. GameObject gameObject2 = this.m_SubOkButton.transform.parent.gameObject;
  167. EventDelegate.Add(this.m_BackButton.onClick, new EventDelegate.Callback(this.OnClickCancelButton));
  168. EventDelegate.Add(this.m_ReleaseButton.onClick, new EventDelegate.Callback(this.SwitchAllRelease));
  169. this.m_DanceShowPanel.SetActive(false);
  170. this.m_DanceModePanel.gameObject.SetActive(false);
  171. switch (RhythmAction_Mgr.NowDance)
  172. {
  173. case RhythmAction_Mgr.DanceType.Free:
  174. case RhythmAction_Mgr.DanceType.View:
  175. case RhythmAction_Mgr.DanceType.Touch:
  176. case RhythmAction_Mgr.DanceType.VrDance:
  177. {
  178. gameObject2.SetActive(false);
  179. this.m_DanceModePanel.gameObject.SetActive(true);
  180. this.m_MainButtonPanel.alpha = 0f;
  181. Transform transform = this.m_DanceModePanel.transform.Find("ButtonGroup");
  182. bool flag = GameMain.Instance.VRMode && !GameMain.Instance.OvrMgr.OvrCamera.IsNoHandController;
  183. if (flag)
  184. {
  185. transform.localPosition = Vector3.zero;
  186. }
  187. IEnumerator enumerator = transform.GetEnumerator();
  188. try
  189. {
  190. while (enumerator.MoveNext())
  191. {
  192. object obj = enumerator.Current;
  193. Transform transform2 = (Transform)obj;
  194. if (!flag && transform2.name == "TouchMode")
  195. {
  196. transform2.gameObject.SetActive(false);
  197. }
  198. else
  199. {
  200. UIButton component = transform2.GetComponent<UIButton>();
  201. UILabel component2 = transform2.Find("Label").GetComponent<UILabel>();
  202. this.m_DanceModeButtonGroup.Add(component, component2);
  203. EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.SetDanceMode));
  204. }
  205. }
  206. }
  207. finally
  208. {
  209. IDisposable disposable;
  210. if ((disposable = (enumerator as IDisposable)) != null)
  211. {
  212. disposable.Dispose();
  213. }
  214. }
  215. break;
  216. }
  217. case RhythmAction_Mgr.DanceType.Challenge:
  218. gameObject.transform.parent = this.CharaSelectPanel.ParentPanel.gameObject.transform;
  219. gameObject2.transform.parent = this.MusicSelectPanel.ParentPanel.gameObject.transform;
  220. UTY.GetChildObject(this.MusicSelectPanel.ParentPanel.gameObject, "SelectPanel", false).SetActive(false);
  221. this.m_DanceShowPanel.SetActive(true);
  222. break;
  223. case RhythmAction_Mgr.DanceType.VS:
  224. case RhythmAction_Mgr.DanceType.VS_Skip:
  225. gameObject.SetActive(false);
  226. this.m_SubCancelButton.gameObject.SetActive(false);
  227. break;
  228. }
  229. this.select_panelset_array_ = new DanceSelect.SelectPanelSet[]
  230. {
  231. this.CharaSelectPanel,
  232. this.MusicSelectPanel
  233. };
  234. for (int i = 0; i < this.select_panelset_array_.Length; i++)
  235. {
  236. NDebug.AssertNull(this.select_panelset_array_[i].ContentsPanel != null && this.select_panelset_array_[i].ParentPanel != null);
  237. }
  238. if (!Product.supportMultiLanguage)
  239. {
  240. this.m_CharaSelectLabel = UTY.GetChildObject(this.CharaSelectPanel.ParentPanel.gameObject, "ExplanatoryText/Value", false).GetComponent<UILabel>();
  241. Localize component3 = this.m_CharaSelectLabel.GetComponent<Localize>();
  242. if (component3 != null)
  243. {
  244. NGUILabelLocalizeSupport component4 = component3.gameObject.GetComponent<NGUILabelLocalizeSupport>();
  245. if (component4 != null)
  246. {
  247. UnityEngine.Object.DestroyImmediate(component4);
  248. }
  249. UnityEngine.Object.DestroyImmediate(component3);
  250. }
  251. this.m_CharaSelectLabel.text = "ダンスを行うメイドを選択してください。";
  252. }
  253. this.chara_select_mgr_ = this.CharaSelectPanel.ParentPanel.gameObject.GetComponentInChildren<CharacterSelectManager>();
  254. NDebug.AssertNull(this.chara_select_mgr_ != null);
  255. }
  256. private void CreateMusicPanel()
  257. {
  258. if (!RhythmAction_Mgr.IsVSDance || RhythmAction_Mgr.NowState != RhythmAction_Mgr.DanceState.Dance_Second)
  259. {
  260. DanceSelect.m_SelectedDance.Clear();
  261. }
  262. this.MusicSelectPanel.ContentsGrid.hideInactive = true;
  263. UIWFTabPanel uiwftabPanel = this.MusicSelectPanel.ContentsGrid.GetComponent<UIWFTabPanel>();
  264. if (!uiwftabPanel)
  265. {
  266. uiwftabPanel = this.MusicSelectPanel.ContentsGrid.gameObject.AddComponent<UIWFTabPanel>();
  267. }
  268. GameObject gameObject = this.MusicSelectPanel.ContentsGrid.gameObject;
  269. for (int i = 0; i < gameObject.transform.childCount; i++)
  270. {
  271. Transform child = gameObject.transform.GetChild(i);
  272. UnityEngine.Object.Destroy(child.gameObject);
  273. }
  274. gameObject.transform.DetachChildren();
  275. int musicReleaseFlag = RhythmAction_Mgr.MusicReleaseFlag;
  276. this.m_SecondDanceData = null;
  277. UIWFTabButton uiwftabButton = null;
  278. int j = 0;
  279. while (j < DanceSelect.dance_data_list_.Count)
  280. {
  281. if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
  282. {
  283. break;
  284. }
  285. if (RhythmAction_Mgr.IsVSDance)
  286. {
  287. if (this.m_SecondDanceData == null && RhythmAction_Mgr.NowState == RhythmAction_Mgr.DanceState.Dance_First && VsDanceDataMgr.Instance.CurrentSetting.Music2ndID == DanceSelect.dance_data_list_[j].ID)
  288. {
  289. this.m_SecondDanceData = DanceSelect.dance_data_list_[j];
  290. }
  291. if (DanceSelect.dance_data_list_[j].Term != DanceData.DanceTerm.VS外 && !((!this.m_ForceTheater) ? (DanceSelect.dance_data_list_[j].bgType == DanceData.BgType.Theater) : (DanceSelect.dance_data_list_[j].bgType != DanceData.BgType.Theater)))
  292. {
  293. if (!this.m_ExistOnlyRelease || DanceSelect.dance_data_list_[j].scenario_progress == this.m_OnlyRelease)
  294. {
  295. if (this.m_ExistOnlyRelease || DanceSelect.dance_data_list_[j].IsPlayable)
  296. {
  297. goto IL_20A;
  298. }
  299. }
  300. }
  301. }
  302. else if (this.m_AllRelease || DanceSelect.dance_data_list_[j].IsPlayable)
  303. {
  304. goto IL_20A;
  305. }
  306. IL_36F:
  307. j++;
  308. continue;
  309. IL_20A:
  310. GameObject gameObject2 = Utility.CreatePrefab(gameObject, "SceneDanceSelect/Prefab/SongPlate", true);
  311. UTY.GetChildObject(gameObject2, "title", false).GetComponent<UILabel>().fontSize = DanceSelect.dance_data_list_[j].title_font_size;
  312. UTY.GetChildObject(gameObject2, "title", false).transform.localPosition = new Vector3(0f, (float)DanceSelect.dance_data_list_[j].title_offset_y, 0f);
  313. UTY.GetChildObject(gameObject2, "title", false).GetComponent<UILabel>().text = DanceSelect.dance_data_list_[j].title;
  314. UTY.GetChildObject(gameObject2, "title", false).GetComponent<Localize>().SetTerm(DanceSelect.dance_data_list_[j].titleTerm);
  315. gameObject2.name = DanceSelect.dance_data_list_[j].title;
  316. UIWFTabButton componentInChildren = gameObject2.GetComponentInChildren<UIWFTabButton>();
  317. if (!uiwftabButton)
  318. {
  319. uiwftabButton = componentInChildren;
  320. }
  321. if (RhythmAction_Mgr.IsVSDance && DanceSelect.dance_data_list_[j].select_chara_num > GameMain.Instance.CharacterMgr.GetStockMaidCount())
  322. {
  323. componentInChildren.isEnabled = false;
  324. this.m_NotSelectDance.Add(componentInChildren);
  325. }
  326. this.m_SongPlatelUIPair.Add(DanceSelect.dance_data_list_[j], componentInChildren);
  327. EventDelegate.Add(componentInChildren.onSelect, new EventDelegate.Callback(this.OnSelectSong));
  328. goto IL_36F;
  329. }
  330. gameObject.GetComponent<UIGrid>().repositionNow = true;
  331. this.MusicSelectPanel.ContentsPanel.GetComponent<UIScrollView>().ResetPosition();
  332. uiwftabPanel.UpdateChildren();
  333. if (RhythmAction_Mgr.IsVSDance && this.m_NotSelectDance.Count > 0)
  334. {
  335. foreach (UIWFTabButton uiwftabButton2 in this.m_SongPlatelUIPair.Values)
  336. {
  337. EventDelegate.Add(uiwftabButton2.onClick, new EventDelegate.Callback(this.PlateDisable));
  338. }
  339. }
  340. if (this.music_info_ != null)
  341. {
  342. this.music_info_.Release();
  343. }
  344. GameObject childObject = UTY.GetChildObject(this.MusicSelectPanel.ParentPanel.gameObject, "MujicInfo", false);
  345. if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
  346. {
  347. childObject.SetActive(false);
  348. this.music_info_ = new DanceSelectMusicInfo(this.m_DanceShowPanel);
  349. }
  350. else
  351. {
  352. this.music_info_ = new DanceSelectMusicInfo(childObject);
  353. }
  354. GameObject infoUI = this.music_info_.InfoUI;
  355. if (RhythmAction_Mgr.IsVSDance)
  356. {
  357. infoUI.SetActive(false);
  358. }
  359. if (uiwftabButton && DanceSelect.m_SelectedDance.Count == 0 && this.IsFreeDance())
  360. {
  361. uiwftabPanel.Select(uiwftabButton);
  362. }
  363. }
  364. private void PlateDisable()
  365. {
  366. foreach (UIWFSelectButton uiwfselectButton in this.m_NotSelectDance)
  367. {
  368. uiwfselectButton.isEnabled = false;
  369. }
  370. }
  371. private void SwitchAllRelease()
  372. {
  373. this.m_AllRelease = !this.m_AllRelease;
  374. this.m_ReleaseButton.defaultColor = (this.m_ReleaseButton.hover = ((!this.m_AllRelease) ? this.m_ReleaseOffCol : this.m_ReleaseOnCol));
  375. this.CreateMusicPanel();
  376. }
  377. public void Start()
  378. {
  379. this.CreateMusicPanel();
  380. this.Init();
  381. this.m_ReleaseButton.defaultColor = (this.m_ReleaseButton.hover = ((!this.m_AllRelease) ? this.m_ReleaseOffCol : this.m_ReleaseOnCol));
  382. if (!this.IsFreeDance())
  383. {
  384. this.m_SettingObj.SetUIMode(string.Empty);
  385. }
  386. this.m_WarningText.SetActive(false);
  387. if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
  388. {
  389. if (DanceSelect.ChallengeDay < GameMain.Instance.CharacterMgr.status.days)
  390. {
  391. List<DanceData> list = (from e in DanceSelect.dance_data_list_
  392. where e.bgType == DanceData.BgType.Theater && e.RhythmGameCorrespond
  393. select e).ToList<DanceData>();
  394. if (!this.m_AllRelease)
  395. {
  396. list = (from e in list
  397. where e.IsPlayable && e.RhythmGameCorrespond
  398. select e).ToList<DanceData>();
  399. }
  400. int index = UnityEngine.Random.Range(0, list.Count);
  401. string title = list[index].title;
  402. for (int i = 0; i < list.Count; i++)
  403. {
  404. if (list[i].title == title)
  405. {
  406. DanceSelect.m_SelectedDance.Clear();
  407. DanceSelect.m_SelectedDance.Add(list[i]);
  408. DanceSelect.m_ChallengeDanceData = list[i];
  409. break;
  410. }
  411. }
  412. DanceSelect.ChallengeDay = GameMain.Instance.CharacterMgr.status.days;
  413. }
  414. else
  415. {
  416. DanceSelect.m_SelectedDance.Clear();
  417. DanceSelect.m_SelectedDance.Add(DanceSelect.m_ChallengeDanceData);
  418. }
  419. this.music_info_.SetDanceData(DanceSelect.m_SelectedDance.First<DanceData>());
  420. this.m_SubOkButton.isEnabled = (DanceSelect.m_ChallengeDanceData.select_chara_num <= GameMain.Instance.CharacterMgr.GetStockMaidCount());
  421. this.m_WarningText.SetActive(!this.m_SubOkButton.isEnabled);
  422. }
  423. }
  424. protected override void OnCall()
  425. {
  426. uGUITutorialPanel.OpenTutorial("SceneDanceSelect", null, false);
  427. GameMain.Instance.SysShortcut.strSceneHelpName = "SceneDanceSelect";
  428. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  429. characterMgr.DeactivateCharaAll();
  430. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  431. {
  432. if (characterMgr.GetMaid(i) != null)
  433. {
  434. characterMgr.Deactivate(i, false);
  435. }
  436. }
  437. GameMain.Instance.BgMgr.ChangeBg(this.m_BGName);
  438. GameMain.Instance.MainCamera.SetTargetPos(this.m_CamPos, true);
  439. GameMain.Instance.MainCamera.SetDistance(this.m_CamDistance, true);
  440. GameMain.Instance.MainCamera.SetAroundAngle(this.m_CamAngle, true);
  441. GameMain.Instance.SoundMgr.PlayBGM(this.m_BGM, 0.5f, true);
  442. this.Init();
  443. if (this.IsFreeDance())
  444. {
  445. this.CallDanceModeSelect();
  446. }
  447. else if (RhythmAction_Mgr.IsVSDance && DanceSelect.m_SelectedDance.Count > 0)
  448. {
  449. this.CallCharaSelect();
  450. }
  451. else
  452. {
  453. this.CallMusicSelect();
  454. }
  455. if (RhythmAction_Mgr.IsVSDance && DanceSelect.m_SelectedDance.Count == 0)
  456. {
  457. UIWFTabPanel componentInChildren = this.MusicSelectPanel.ContentsPanel.GetComponentInChildren<UIWFTabPanel>();
  458. componentInChildren.Select(this.MusicSelectPanel.ContentsGrid.GetChild(0).GetComponentInChildren<UIWFTabButton>());
  459. }
  460. if (GameMain.Instance.VRMode)
  461. {
  462. UnityEngine.Object original = Resources.Load("OVR/DanceOVRDialog");
  463. GameObject gameObject = UnityEngine.Object.Instantiate(original) as GameObject;
  464. GameObject gameObject2 = GameObject.Find("/UI Root");
  465. gameObject.transform.SetParent(gameObject2.transform, false);
  466. gameObject.GetComponent<UIPanel>().depth = 250;
  467. this.ovr_dance_cam_dlg_ = gameObject.GetComponent<FFNameDialog>();
  468. this.ovr_dance_cam_dlg_.Init();
  469. gameObject.SetActive(false);
  470. }
  471. }
  472. public void OnDestroy()
  473. {
  474. if (this.music_info_ != null)
  475. {
  476. this.music_info_.Release();
  477. }
  478. }
  479. public override void Update()
  480. {
  481. base.Update();
  482. if (GameMain.Instance.MainCamera.IsFadeProc() || GameMain.Instance.MainCamera.IsFadeOut())
  483. {
  484. return;
  485. }
  486. if (this.m_ReleaseButton.gameObject.activeSelf)
  487. {
  488. return;
  489. }
  490. foreach (KeyCode key in this.m_ReleseShowKey)
  491. {
  492. if (!Input.GetKey(key))
  493. {
  494. return;
  495. }
  496. }
  497. this.m_ReleaseButton.gameObject.SetActive(true);
  498. }
  499. private void Init()
  500. {
  501. this.m_DanceModePanel.alpha = 0f;
  502. for (int i = 0; i < this.select_panelset_array_.Length; i++)
  503. {
  504. this.select_panelset_array_[i].ParentPanel.gameObject.SetActive(true);
  505. this.select_panelset_array_[i].ParentPanel.alpha = 0f;
  506. }
  507. DanceMain.KaraokeMode = false;
  508. UIRect danceModePanel = this.m_DanceModePanel;
  509. float num = 0f;
  510. this.MusicSelectPanel.ParentPanel.alpha = num;
  511. num = num;
  512. this.CharaSelectPanel.ParentPanel.alpha = num;
  513. danceModePanel.alpha = num;
  514. if (this.IsFreeDance())
  515. {
  516. this.m_DanceModePanel.alpha = 1f;
  517. }
  518. else if (RhythmAction_Mgr.IsVSDance && DanceSelect.m_SelectedDance.Count > 0)
  519. {
  520. this.CharaSelectPanel.ParentPanel.alpha = 1f;
  521. }
  522. else
  523. {
  524. this.MusicSelectPanel.ParentPanel.alpha = 1f;
  525. }
  526. }
  527. public void SetCancelLabel(string cancel_call_label)
  528. {
  529. this.cancel_call_label_ = cancel_call_label;
  530. }
  531. private void CallMusicSelect()
  532. {
  533. string normalSprite = "cm3d2_common_nextbuttom";
  534. if (this.IsFreeDance())
  535. {
  536. this.OkButton.normalSprite = normalSprite;
  537. this.OkButton.isEnabled = true;
  538. }
  539. else
  540. {
  541. this.m_SubOkButton.normalSprite = normalSprite;
  542. }
  543. bool flag = false;
  544. bool flag2 = false;
  545. UIWFTabButton uiwftabButton = null;
  546. foreach (KeyValuePair<DanceData, UIWFTabButton> keyValuePair in this.m_SongPlatelUIPair)
  547. {
  548. if (RhythmAction_Mgr.IsRhythmGameMode)
  549. {
  550. keyValuePair.Value.transform.parent.gameObject.SetActive(keyValuePair.Key.RhythmGameCorrespond);
  551. if (!keyValuePair.Key.RhythmGameCorrespond)
  552. {
  553. if (DanceSelect.m_SelectedDance.Count<DanceData>() > 0 && DanceSelect.m_SelectedDance.First<DanceData>() == keyValuePair.Key)
  554. {
  555. keyValuePair.Value.SetSelect(false);
  556. flag = true;
  557. }
  558. }
  559. else if (flag && !flag2)
  560. {
  561. flag2 = true;
  562. keyValuePair.Value.SetSelect(true);
  563. }
  564. }
  565. else
  566. {
  567. keyValuePair.Value.transform.parent.gameObject.SetActive(true);
  568. }
  569. if (keyValuePair.Value.transform.parent.gameObject.activeSelf)
  570. {
  571. uiwftabButton = keyValuePair.Value;
  572. }
  573. }
  574. if (flag && !flag2)
  575. {
  576. uiwftabButton.SetSelect(true);
  577. }
  578. this.MusicSelectPanel.ContentsGrid.repositionNow = true;
  579. this.status_ = DanceSelect.Status.MusicSelect;
  580. if (this.MusicSelectPanel.ParentPanel.alpha != 1f)
  581. {
  582. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  583. {
  584. "easetype",
  585. iTween.EaseType.easeOutQuad,
  586. "from",
  587. 0f,
  588. "to",
  589. 1f,
  590. "time",
  591. DanceSelect.kFadeTime,
  592. "delay",
  593. 0,
  594. "onUpdate",
  595. "OnUpdateFadeMusicPanel"
  596. }));
  597. if (this.CharaSelectPanel.ParentPanel.alpha != 0f)
  598. {
  599. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  600. {
  601. "easetype",
  602. iTween.EaseType.easeOutQuad,
  603. "from",
  604. 1f,
  605. "to",
  606. 0f,
  607. "time",
  608. DanceSelect.kFadeTime,
  609. "delay",
  610. 0,
  611. "onUpdate",
  612. "OnUpdateFadeCharaPanel"
  613. }));
  614. }
  615. else if (this.m_DanceModePanel.alpha != 0f)
  616. {
  617. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  618. {
  619. "easetype",
  620. iTween.EaseType.easeOutQuad,
  621. "from",
  622. 1f,
  623. "to",
  624. 0f,
  625. "time",
  626. DanceSelect.kFadeTime,
  627. "delay",
  628. 0,
  629. "onUpdate",
  630. "OnUpdateDanceModePanel"
  631. }));
  632. }
  633. }
  634. }
  635. private void CallCharaSelect()
  636. {
  637. string normalSprite = "cm3d2_common_okbuttom";
  638. if (RhythmAction_Mgr.IsVSDance)
  639. {
  640. this.m_SubOkButton.normalSprite = normalSprite;
  641. }
  642. else
  643. {
  644. this.OkButton.normalSprite = normalSprite;
  645. }
  646. this.status_ = DanceSelect.Status.CaharaSelect;
  647. DanceSelect.m_SelectedMaid.Clear();
  648. if (DanceSelect.m_SelectedDance.Count > 0)
  649. {
  650. int select_chara_num = DanceSelect.m_SelectedDance.First<DanceData>().select_chara_num;
  651. if (RhythmAction_Mgr.IsVSDance && this.m_SecondDanceData != null)
  652. {
  653. DanceSelect.m_SelectedDance.Add(this.m_SecondDanceData);
  654. }
  655. if (!Product.supportMultiLanguage && (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge || RhythmAction_Mgr.IsVSDance))
  656. {
  657. this.m_CharaSelectLabel.text = "ダンスを行うメイドを" + select_chara_num + "人選択してください。";
  658. }
  659. if (1 < select_chara_num)
  660. {
  661. if (RhythmAction_Mgr.IsVSDance)
  662. {
  663. this.m_SubOkButton.isEnabled = false;
  664. }
  665. else
  666. {
  667. this.OkButton.isEnabled = false;
  668. }
  669. CharacterSelectManager.CallBackOnMultiSelect callBackOnMultiSelect = delegate(Maid[] maid_array)
  670. {
  671. DanceSelect.m_SelectedMaid.Clear();
  672. for (int j = 0; j < maid_array.Length; j++)
  673. {
  674. DanceSelect.m_SelectedMaid.Add(maid_array[j]);
  675. }
  676. if (RhythmAction_Mgr.IsVSDance)
  677. {
  678. this.m_SubOkButton.isEnabled = DanceSelect.m_SelectedMaid.All((Maid e) => e != null);
  679. }
  680. else if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
  681. {
  682. this.OkButton.isEnabled = DanceSelect.m_SelectedMaid.All((Maid e) => e != null);
  683. }
  684. else
  685. {
  686. this.OkButton.isEnabled = DanceSelect.m_SelectedMaid.Any((Maid e) => e != null);
  687. }
  688. };
  689. this.chara_select_mgr_.SetCallBackOnMultiSelect(callBackOnMultiSelect);
  690. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Multiple, select_chara_num, true);
  691. }
  692. else
  693. {
  694. CharacterSelectManager.CallBackOnSelect callBackCallBackOnSelect = delegate(Maid select_maid)
  695. {
  696. DanceSelect.m_SelectedMaid.Clear();
  697. DanceSelect.m_SelectedMaid.Add(select_maid);
  698. };
  699. this.chara_select_mgr_.SetCallBackCallBackOnSelect(callBackCallBackOnSelect);
  700. this.chara_select_mgr_.Create(CharacterSelectManager.Type.Select, 3, true);
  701. }
  702. if (RhythmAction_Mgr.IsVSDance)
  703. {
  704. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
  705. {
  706. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
  707. if (!VsDanceDataMgr.Instance.CurrentSetting.IsCanBattleParticipate(stockMaid))
  708. {
  709. this.chara_select_mgr_.RemoveMaidPlate(stockMaid);
  710. }
  711. }
  712. }
  713. }
  714. if (this.CharaSelectPanel.ParentPanel.alpha != 1f)
  715. {
  716. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  717. {
  718. "easetype",
  719. iTween.EaseType.easeOutQuad,
  720. "from",
  721. 0f,
  722. "to",
  723. 1f,
  724. "time",
  725. DanceSelect.kFadeTime,
  726. "delay",
  727. 0,
  728. "onUpdate",
  729. "OnUpdateFadeCharaPanel"
  730. }));
  731. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  732. {
  733. "easetype",
  734. iTween.EaseType.easeOutQuad,
  735. "from",
  736. 1f,
  737. "to",
  738. 0f,
  739. "time",
  740. DanceSelect.kFadeTime,
  741. "delay",
  742. 0,
  743. "onUpdate",
  744. "OnUpdateFadeMusicPanel"
  745. }));
  746. }
  747. }
  748. private void CallDanceModeSelect()
  749. {
  750. this.status_ = DanceSelect.Status.DanceModeSelect;
  751. this.m_MainButtonFade = true;
  752. if (this.m_DanceModePanel.alpha != 1f)
  753. {
  754. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  755. {
  756. "easetype",
  757. iTween.EaseType.easeOutQuad,
  758. "from",
  759. 0f,
  760. "to",
  761. 1f,
  762. "time",
  763. DanceSelect.kFadeTime,
  764. "delay",
  765. 0,
  766. "onUpdate",
  767. "OnUpdateDanceModePanel"
  768. }));
  769. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  770. {
  771. "easetype",
  772. iTween.EaseType.easeOutQuad,
  773. "from",
  774. 1f,
  775. "to",
  776. 0f,
  777. "time",
  778. DanceSelect.kFadeTime,
  779. "delay",
  780. 0,
  781. "onUpdate",
  782. "OnUpdateFadeMusicPanel"
  783. }));
  784. }
  785. }
  786. private void OnUpdateFadeMusicPanel(float val)
  787. {
  788. this.MusicSelectPanel.ParentPanel.alpha = val;
  789. if (this.m_MainButtonFade)
  790. {
  791. this.m_MainButtonPanel.alpha = val;
  792. }
  793. }
  794. private void OnUpdateFadeCharaPanel(float val)
  795. {
  796. this.CharaSelectPanel.ParentPanel.alpha = val;
  797. }
  798. private void OnUpdateDanceModePanel(float val)
  799. {
  800. this.m_DanceModePanel.alpha = val;
  801. }
  802. private void OnSelectSong()
  803. {
  804. if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
  805. {
  806. return;
  807. }
  808. string name = UIWFSelectButton.current.gameObject.transform.parent.name;
  809. if (!UIWFSelectButton.current.isSelected)
  810. {
  811. return;
  812. }
  813. for (int i = 0; i < DanceSelect.dance_data_list_.Count; i++)
  814. {
  815. if (DanceSelect.dance_data_list_[i].title == name)
  816. {
  817. DanceSelect.m_SelectedDance.Clear();
  818. DanceSelect.m_SelectedDance.Add(DanceSelect.dance_data_list_[i]);
  819. this.music_info_.SetDanceData(DanceSelect.m_SelectedDance.First<DanceData>());
  820. if (!this.music_info_.InfoUI.activeSelf)
  821. {
  822. this.music_info_.InfoUI.SetActive(true);
  823. }
  824. break;
  825. }
  826. }
  827. }
  828. private void OnClickOkButton()
  829. {
  830. if (DanceSelect.m_SelectedDance == null)
  831. {
  832. return;
  833. }
  834. if (this.status_ == DanceSelect.Status.MusicSelect)
  835. {
  836. if (this.MusicSelectPanel.ParentPanel.alpha != 1f)
  837. {
  838. return;
  839. }
  840. this.m_MainButtonFade = false;
  841. this.CallCharaSelect();
  842. }
  843. else if (this.status_ == DanceSelect.Status.CaharaSelect)
  844. {
  845. if (DanceSelect.m_SelectedDance.First<DanceData>().select_chara_num == 1 && DanceSelect.m_SelectedMaid.Count <= 0)
  846. {
  847. return;
  848. }
  849. if (this.CharaSelectPanel.ParentPanel.alpha != 1f)
  850. {
  851. return;
  852. }
  853. DanceMain.SelectDanceData = DanceSelect.m_SelectedDance.First<DanceData>();
  854. string str = DanceSelect.m_SelectedDance.First<DanceData>().scene_name;
  855. if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge && !string.IsNullOrEmpty(DanceSelect.m_SelectedDance.First<DanceData>().danceshow_scene))
  856. {
  857. str = DanceSelect.m_SelectedDance.First<DanceData>().danceshow_scene;
  858. }
  859. GameMain.Instance.ScriptMgr.EvalScript("tf['dance_scene_name'] = '" + str + "';");
  860. foreach (Maid maid in DanceSelect.m_SelectedMaid)
  861. {
  862. if (maid)
  863. {
  864. DanceSelect.SelectTopMaid = maid;
  865. break;
  866. }
  867. }
  868. this.m_SettingObj.DisSelectable();
  869. if (!GameMain.Instance.VRMode)
  870. {
  871. this.Finish();
  872. }
  873. else if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Touch)
  874. {
  875. this.OnOvrCamFree();
  876. }
  877. else
  878. {
  879. this.ovr_dance_cam_dlg_.ShowFromLanguageTerm("SceneDanceSelect/カメラのタイプを選んで下さい。", "SceneDanceSelect/自由カメラ", new FFNameDialog.OnClick(this.OnOvrCamFree), "SceneDanceSelect/移動カメラ", new FFNameDialog.OnClick(this.OnOvrCamMove), string.Empty, null);
  880. }
  881. }
  882. }
  883. private void OnClickCancelButton()
  884. {
  885. switch (this.status_)
  886. {
  887. case DanceSelect.Status.MusicSelect:
  888. if (this.MusicSelectPanel.ParentPanel.alpha != 1f)
  889. {
  890. return;
  891. }
  892. if (this.IsFreeDance())
  893. {
  894. this.m_MainButtonFade = true;
  895. this.CallDanceModeSelect();
  896. }
  897. else if (!string.IsNullOrEmpty(this.cancel_call_label_))
  898. {
  899. this.CancelFinish();
  900. }
  901. break;
  902. case DanceSelect.Status.CaharaSelect:
  903. if (this.CharaSelectPanel.ParentPanel.alpha != 1f)
  904. {
  905. return;
  906. }
  907. this.m_MainButtonFade = false;
  908. this.CallMusicSelect();
  909. break;
  910. case DanceSelect.Status.DanceModeSelect:
  911. if (this.m_DanceModePanel.alpha != 1f)
  912. {
  913. return;
  914. }
  915. if (!string.IsNullOrEmpty(this.cancel_call_label_))
  916. {
  917. this.CancelFinish();
  918. }
  919. break;
  920. }
  921. }
  922. private void CancelFinish()
  923. {
  924. DanceSelectManager danceSelectManager = base.parent_mgr as DanceSelectManager;
  925. NDebug.AssertNull(danceSelectManager != null);
  926. danceSelectManager.move_screen.SetNextLabel(this.cancel_call_label_);
  927. DanceSelect.m_SelectedDance.Clear();
  928. this.Finish();
  929. }
  930. private void SetDanceMode()
  931. {
  932. if (this.m_DanceModePanel.alpha != 1f)
  933. {
  934. return;
  935. }
  936. RhythmAction_Mgr.DanceType nowDance = RhythmAction_Mgr.NowDance;
  937. if (this.m_DanceModeButtonGroup[UIButton.current].transform.parent.name == "GameMode")
  938. {
  939. RhythmAction_Mgr.SetDanceType(RhythmAction_Mgr.DanceType.Free);
  940. }
  941. else if (this.m_DanceModeButtonGroup[UIButton.current].transform.parent.name == "ViewMode")
  942. {
  943. RhythmAction_Mgr.SetDanceType(RhythmAction_Mgr.DanceType.View);
  944. }
  945. else if (this.m_DanceModeButtonGroup[UIButton.current].transform.parent.name == "TouchMode")
  946. {
  947. RhythmAction_Mgr.SetDanceType(RhythmAction_Mgr.DanceType.Touch);
  948. }
  949. Localize component = this.m_DanceModeButtonGroup[UIButton.current].GetComponent<Localize>();
  950. string translation = LocalizationManager.GetTranslation(component.Term, true, 0, true, false, null, Product.EnumConvert.ToI2LocalizeLanguageName(Product.Language.Japanese));
  951. this.m_SettingObj.SetUIMode(translation);
  952. this.CallMusicSelect();
  953. }
  954. private void OnOvrCamFree()
  955. {
  956. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
  957. this.Finish();
  958. }
  959. private void OnOvrCamMove()
  960. {
  961. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 1);
  962. this.Finish();
  963. }
  964. private bool IsFreeDance()
  965. {
  966. bool flag = RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Free;
  967. flag |= (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.View);
  968. return flag | RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Touch;
  969. }
  970. public override bool Finish()
  971. {
  972. bool flag = base.Finish();
  973. if (flag && 0 < DanceSelect.m_SelectedMaid.Count && RhythmAction_Mgr.IsVSDance)
  974. {
  975. GameMain.Instance.SoundMgr.StopBGM(1.5f);
  976. }
  977. return flag;
  978. }
  979. protected override void OnFinish()
  980. {
  981. if (DanceSelect.m_SelectedDance.Count > 0)
  982. {
  983. DanceSelect.SelectMaidActive(DanceSelect.m_SelectedDance.First<DanceData>());
  984. }
  985. base.parent_mgr.CallScreen("Move");
  986. GameMain.Instance.LoadIcon.NextLoadIcontImmediatelyDisplay();
  987. }
  988. public static void BenchMarkInit()
  989. {
  990. DanceSelect.SelectTopMaid = null;
  991. DanceSelect.m_SelectedDance.Clear();
  992. DanceSelect.m_SelectedMaid.Clear();
  993. DanceSelect.CreateDanceData();
  994. DanceData danceData = DanceSelect.dance_data_list_.SingleOrDefault((DanceData e) => e.title == "Night Magic Fire");
  995. NDebug.Assert(danceData != null, "ダンス曲「Night Magic Fire」が存在してません");
  996. DanceMain.SelectDanceData = danceData;
  997. GameMain.Instance.ScriptMgr.EvalScript("tf['dance_scene_name'] = '" + danceData.scene_name + "';");
  998. }
  999. public static void TrialVsDanceInit()
  1000. {
  1001. }
  1002. public static void SelectMaidActive(DanceData set_dance)
  1003. {
  1004. if (set_dance == null)
  1005. {
  1006. return;
  1007. }
  1008. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1009. characterMgr.DeactivateCharaAll();
  1010. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンス設定人数", 0);
  1011. if (0 < DanceSelect.m_SelectedMaid.Count)
  1012. {
  1013. int num = 0;
  1014. for (int i = 0; i < set_dance.select_chara_num; i++)
  1015. {
  1016. if (i >= DanceSelect.m_SelectedMaid.Count)
  1017. {
  1018. break;
  1019. }
  1020. if (DanceSelect.m_SelectedMaid[i])
  1021. {
  1022. characterMgr.SetActiveMaid(DanceSelect.m_SelectedMaid[i], i);
  1023. num++;
  1024. }
  1025. }
  1026. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンス設定人数", num);
  1027. }
  1028. }
  1029. public static void SetNextDance()
  1030. {
  1031. if (!RhythmAction_Mgr.IsVSDance || DanceMain.KaraokeMode)
  1032. {
  1033. DanceMain.SelectDanceData = null;
  1034. return;
  1035. }
  1036. if (!DanceBattle_Mgr.Instance.IsWin() && RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.VS_Skip)
  1037. {
  1038. DanceMain.SelectDanceData = null;
  1039. }
  1040. else if (DanceSelect.m_SelectedDance.Count > 0)
  1041. {
  1042. DanceSelect.m_SelectedDance.RemoveAt(0);
  1043. if (DanceSelect.m_SelectedDance.Count > 0)
  1044. {
  1045. DanceMain.SelectDanceData = DanceSelect.m_SelectedDance.First<DanceData>();
  1046. }
  1047. }
  1048. }
  1049. public static List<DanceData> GetDanceDataList()
  1050. {
  1051. DanceSelect.CreateDanceData();
  1052. return DanceSelect.dance_data_list_;
  1053. }
  1054. public static List<Maid> SelectedMaid
  1055. {
  1056. get
  1057. {
  1058. return DanceSelect.m_SelectedMaid;
  1059. }
  1060. }
  1061. public static Maid SelectTopMaid { get; private set; }
  1062. private bool m_AllRelease
  1063. {
  1064. get
  1065. {
  1066. return DanceSetting.Settings.AllRelease;
  1067. }
  1068. set
  1069. {
  1070. DanceSetting.Settings.AllRelease = value;
  1071. }
  1072. }
  1073. public static float kFadeTime = 0.3f;
  1074. public static List<DanceData> dance_data_list_;
  1075. private const int m_SongSelectMax = 2;
  1076. private const string m_NMFtitle = "Night Magic Fire";
  1077. private const string m_ETYLtitle = "entrance to you";
  1078. private const string m_TutorialName = "SceneDanceSelect";
  1079. public DanceSelect.SelectPanelSet CharaSelectPanel;
  1080. public DanceSelect.SelectPanelSet MusicSelectPanel;
  1081. public UIButton OkButton;
  1082. public UIButton CancelButton;
  1083. private UIPanel m_MainButtonPanel;
  1084. private bool m_MainButtonFade;
  1085. [SerializeField]
  1086. [Header("背景名")]
  1087. private string m_BGName = "LiveStage";
  1088. [SerializeField]
  1089. [Header("BGM名")]
  1090. private string m_BGM = "BGM020.ogg";
  1091. [SerializeField]
  1092. private Vector3 m_CamPos = new Vector3(0.03458221f, 0.4823192f, 0.1880018f);
  1093. [SerializeField]
  1094. private float m_CamDistance = 7.199994f;
  1095. [SerializeField]
  1096. private Vector2 m_CamAngle = new Vector2(180.2993f, 21.18012f);
  1097. [SerializeField]
  1098. [Header("右下のOKボタン")]
  1099. private UIButton m_SubOkButton;
  1100. [SerializeField]
  1101. [Header("右下のCancelボタン")]
  1102. private UIButton m_SubCancelButton;
  1103. [SerializeField]
  1104. [Header("Backボタン")]
  1105. private UIButton m_BackButton;
  1106. [SerializeField]
  1107. [Header("ダンスモード設定パネル")]
  1108. private UIPanel m_DanceModePanel;
  1109. [SerializeField]
  1110. [Header("人数不足警告テキスト")]
  1111. private GameObject m_WarningText;
  1112. private Dictionary<UIButton, UILabel> m_DanceModeButtonGroup = new Dictionary<UIButton, UILabel>();
  1113. [SerializeField]
  1114. [Header("チャレンジ時の楽曲情報UIパネル")]
  1115. private GameObject m_DanceShowPanel;
  1116. [SerializeField]
  1117. [Header("ダンス設定UI")]
  1118. private DanceSetting m_SettingObj;
  1119. [SerializeField]
  1120. [Header("曲全解放ボタン")]
  1121. private UIButton m_ReleaseButton;
  1122. [SerializeField]
  1123. private Color m_ReleaseOnCol;
  1124. [SerializeField]
  1125. private Color m_ReleaseOffCol;
  1126. [SerializeField]
  1127. [Header("全曲解放ボタンを表示する際のショートカットキー")]
  1128. private List<KeyCode> m_ReleseShowKey = new List<KeyCode>
  1129. {
  1130. KeyCode.D,
  1131. KeyCode.N,
  1132. KeyCode.C
  1133. };
  1134. private UILabel m_CharaSelectLabel;
  1135. private List<UIWFSelectButton> m_NotSelectDance = new List<UIWFSelectButton>();
  1136. private Dictionary<DanceData, UIWFTabButton> m_SongPlatelUIPair = new Dictionary<DanceData, UIWFTabButton>();
  1137. private static List<DanceData> m_SelectedDance = new List<DanceData>();
  1138. private static List<Maid> m_SelectedMaid = new List<Maid>();
  1139. private DanceData m_SecondDanceData;
  1140. private static DanceData m_ChallengeDanceData = null;
  1141. public static int ChallengeDay = 0;
  1142. private bool m_ForceTheater;
  1143. private bool m_ExistOnlyRelease;
  1144. private int m_OnlyRelease = -1;
  1145. private DanceSelectMusicInfo music_info_;
  1146. private DanceSelect.SelectPanelSet[] select_panelset_array_;
  1147. private CharacterSelectManager chara_select_mgr_;
  1148. private DanceSelect.Status status_;
  1149. private string cancel_call_label_;
  1150. private FFNameDialog ovr_dance_cam_dlg_;
  1151. [Serializable]
  1152. public class SelectPanelSet
  1153. {
  1154. public UIGrid ContentsGrid
  1155. {
  1156. get
  1157. {
  1158. if (!this.m_ContentsGrid)
  1159. {
  1160. this.m_ContentsGrid = this.ContentsPanel.GetComponentInChildren<UIGrid>();
  1161. }
  1162. return this.m_ContentsGrid;
  1163. }
  1164. }
  1165. public UIPanel ParentPanel;
  1166. public UIPanel ContentsPanel;
  1167. private UIGrid m_ContentsGrid;
  1168. }
  1169. private enum Status
  1170. {
  1171. MusicSelect,
  1172. CaharaSelect,
  1173. DanceModeSelect
  1174. }
  1175. }