DanceSelect.cs 36 KB

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