DanceSelect.cs 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259
  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.SPP)
  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.SPP && (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_.Show("カメラのタイプを選んで下さい。", "自由カメラ", new FFNameDialog.OnClick(this.OnOvrCamFree), "移動カメラ", new FFNameDialog.OnClick(this.OnOvrCamMove));
  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. this.m_SettingObj.SetUIMode(this.m_DanceModeButtonGroup[UIButton.current].text);
  950. this.CallMusicSelect();
  951. }
  952. private void OnOvrCamFree()
  953. {
  954. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
  955. this.Finish();
  956. }
  957. private void OnOvrCamMove()
  958. {
  959. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 1);
  960. this.Finish();
  961. }
  962. private bool IsFreeDance()
  963. {
  964. bool flag = RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Free;
  965. flag |= (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.View);
  966. return flag | RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Touch;
  967. }
  968. public override bool Finish()
  969. {
  970. bool flag = base.Finish();
  971. if (flag && 0 < DanceSelect.m_SelectedMaid.Count && RhythmAction_Mgr.IsVSDance)
  972. {
  973. GameMain.Instance.SoundMgr.StopBGM(1.5f);
  974. }
  975. return flag;
  976. }
  977. protected override void OnFinish()
  978. {
  979. if (DanceSelect.m_SelectedDance.Count > 0)
  980. {
  981. DanceSelect.SelectMaidActive(DanceSelect.m_SelectedDance.First<DanceData>());
  982. }
  983. base.parent_mgr.CallScreen("Move");
  984. GameMain.Instance.LoadIcon.NextLoadIcontImmediatelyDisplay();
  985. }
  986. public static void BenchMarkInit()
  987. {
  988. DanceSelect.SelectTopMaid = null;
  989. DanceSelect.m_SelectedDance.Clear();
  990. DanceSelect.m_SelectedMaid.Clear();
  991. DanceSelect.CreateDanceData();
  992. DanceData danceData = DanceSelect.dance_data_list_.SingleOrDefault((DanceData e) => e.title == "Night Magic Fire");
  993. NDebug.Assert(danceData != null, "ダンス曲「Night Magic Fire」が存在してません");
  994. DanceMain.SelectDanceData = danceData;
  995. GameMain.Instance.ScriptMgr.EvalScript("tf['dance_scene_name'] = '" + danceData.scene_name + "';");
  996. }
  997. public static void TrialVsDanceInit()
  998. {
  999. }
  1000. public static void SelectMaidActive(DanceData set_dance)
  1001. {
  1002. if (set_dance == null)
  1003. {
  1004. return;
  1005. }
  1006. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1007. characterMgr.DeactivateCharaAll();
  1008. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンス設定人数", 0);
  1009. if (0 < DanceSelect.m_SelectedMaid.Count)
  1010. {
  1011. int num = 0;
  1012. for (int i = 0; i < set_dance.select_chara_num; i++)
  1013. {
  1014. if (i >= DanceSelect.m_SelectedMaid.Count)
  1015. {
  1016. break;
  1017. }
  1018. if (DanceSelect.m_SelectedMaid[i])
  1019. {
  1020. characterMgr.SetActiveMaid(DanceSelect.m_SelectedMaid[i], i);
  1021. num++;
  1022. }
  1023. }
  1024. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンス設定人数", num);
  1025. }
  1026. }
  1027. public static void SetNextDance()
  1028. {
  1029. if (!RhythmAction_Mgr.IsVSDance || DanceMain.KaraokeMode)
  1030. {
  1031. DanceMain.SelectDanceData = null;
  1032. return;
  1033. }
  1034. if (!DanceBattle_Mgr.Instance.IsWin() && RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.VS_Skip)
  1035. {
  1036. DanceMain.SelectDanceData = null;
  1037. }
  1038. else if (DanceSelect.m_SelectedDance.Count > 0)
  1039. {
  1040. DanceSelect.m_SelectedDance.RemoveAt(0);
  1041. if (DanceSelect.m_SelectedDance.Count > 0)
  1042. {
  1043. DanceMain.SelectDanceData = DanceSelect.m_SelectedDance.First<DanceData>();
  1044. }
  1045. }
  1046. }
  1047. public static List<DanceData> GetDanceDataList()
  1048. {
  1049. DanceSelect.CreateDanceData();
  1050. return DanceSelect.dance_data_list_;
  1051. }
  1052. public static List<Maid> SelectedMaid
  1053. {
  1054. get
  1055. {
  1056. return DanceSelect.m_SelectedMaid;
  1057. }
  1058. }
  1059. public static Maid SelectTopMaid { get; private set; }
  1060. private bool m_AllRelease
  1061. {
  1062. get
  1063. {
  1064. return DanceSetting.Settings.AllRelease;
  1065. }
  1066. set
  1067. {
  1068. DanceSetting.Settings.AllRelease = value;
  1069. }
  1070. }
  1071. public static float kFadeTime = 0.3f;
  1072. public static List<DanceData> dance_data_list_;
  1073. private const int m_SongSelectMax = 2;
  1074. private const string m_NMFtitle = "Night Magic Fire";
  1075. private const string m_ETYLtitle = "entrance to you";
  1076. private const string m_TutorialName = "SceneDanceSelect";
  1077. public DanceSelect.SelectPanelSet CharaSelectPanel;
  1078. public DanceSelect.SelectPanelSet MusicSelectPanel;
  1079. public UIButton OkButton;
  1080. public UIButton CancelButton;
  1081. private UIPanel m_MainButtonPanel;
  1082. private bool m_MainButtonFade;
  1083. [SerializeField]
  1084. [Header("背景名")]
  1085. private string m_BGName = "LiveStage";
  1086. [SerializeField]
  1087. [Header("BGM名")]
  1088. private string m_BGM = "BGM020.ogg";
  1089. [SerializeField]
  1090. private Vector3 m_CamPos = new Vector3(0.03458221f, 0.4823192f, 0.1880018f);
  1091. [SerializeField]
  1092. private float m_CamDistance = 7.199994f;
  1093. [SerializeField]
  1094. private Vector2 m_CamAngle = new Vector2(180.2993f, 21.18012f);
  1095. [SerializeField]
  1096. [Header("右下のOKボタン")]
  1097. private UIButton m_SubOkButton;
  1098. [SerializeField]
  1099. [Header("右下のCancelボタン")]
  1100. private UIButton m_SubCancelButton;
  1101. [SerializeField]
  1102. [Header("Backボタン")]
  1103. private UIButton m_BackButton;
  1104. [SerializeField]
  1105. [Header("ダンスモード設定パネル")]
  1106. private UIPanel m_DanceModePanel;
  1107. [SerializeField]
  1108. [Header("人数不足警告テキスト")]
  1109. private GameObject m_WarningText;
  1110. private Dictionary<UIButton, UILabel> m_DanceModeButtonGroup = new Dictionary<UIButton, UILabel>();
  1111. [SerializeField]
  1112. [Header("チャレンジ時の楽曲情報UIパネル")]
  1113. private GameObject m_DanceShowPanel;
  1114. [SerializeField]
  1115. [Header("ダンス設定UI")]
  1116. private DanceSetting m_SettingObj;
  1117. [SerializeField]
  1118. [Header("曲全解放ボタン")]
  1119. private UIButton m_ReleaseButton;
  1120. [SerializeField]
  1121. private Color m_ReleaseOnCol;
  1122. [SerializeField]
  1123. private Color m_ReleaseOffCol;
  1124. [SerializeField]
  1125. [Header("全曲解放ボタンを表示する際のショートカットキー")]
  1126. private List<KeyCode> m_ReleseShowKey = new List<KeyCode>
  1127. {
  1128. KeyCode.D,
  1129. KeyCode.N,
  1130. KeyCode.C
  1131. };
  1132. private UILabel m_CharaSelectLabel;
  1133. private List<UIWFSelectButton> m_NotSelectDance = new List<UIWFSelectButton>();
  1134. private Dictionary<DanceData, UIWFTabButton> m_SongPlatelUIPair = new Dictionary<DanceData, UIWFTabButton>();
  1135. private static List<DanceData> m_SelectedDance = new List<DanceData>();
  1136. private static List<Maid> m_SelectedMaid = new List<Maid>();
  1137. private DanceData m_SecondDanceData;
  1138. private static DanceData m_ChallengeDanceData = null;
  1139. public static int ChallengeDay = 0;
  1140. private bool m_ForceTheater;
  1141. private bool m_ExistOnlyRelease;
  1142. private int m_OnlyRelease = -1;
  1143. private DanceSelectMusicInfo music_info_;
  1144. private DanceSelect.SelectPanelSet[] select_panelset_array_;
  1145. private CharacterSelectManager chara_select_mgr_;
  1146. private DanceSelect.Status status_;
  1147. private string cancel_call_label_;
  1148. private FFNameDialog ovr_dance_cam_dlg_;
  1149. [Serializable]
  1150. public class SelectPanelSet
  1151. {
  1152. public UIGrid ContentsGrid
  1153. {
  1154. get
  1155. {
  1156. if (!this.m_ContentsGrid)
  1157. {
  1158. this.m_ContentsGrid = this.ContentsPanel.GetComponentInChildren<UIGrid>();
  1159. }
  1160. return this.m_ContentsGrid;
  1161. }
  1162. }
  1163. public UIPanel ParentPanel;
  1164. public UIPanel ContentsPanel;
  1165. private UIGrid m_ContentsGrid;
  1166. }
  1167. private enum Status
  1168. {
  1169. MusicSelect,
  1170. CaharaSelect,
  1171. DanceModeSelect
  1172. }
  1173. }