DanceSelect.cs 37 KB

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