DanceSelect.cs 38 KB

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