DanceSetting.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Runtime.Serialization.Formatters.Binary;
  7. using System.Text;
  8. using Dance;
  9. using I2.Loc;
  10. using UnityEngine;
  11. public class DanceSetting : MonoBehaviour
  12. {
  13. private void Awake()
  14. {
  15. this.m_OrijinBgheight = this.m_SettingUIBg.height;
  16. if (!DanceSetting.m_IsFileCheck)
  17. {
  18. Action<string, bool> action = delegate(string file_path, bool binary_ver)
  19. {
  20. float num = -1f;
  21. FileInfo fileInfo = new FileInfo(file_path);
  22. try
  23. {
  24. if (binary_ver)
  25. {
  26. using (FileStream fileStream = new FileStream(file_path, FileMode.Open, FileAccess.Read))
  27. {
  28. BinaryFormatter binaryFormatter = new BinaryFormatter();
  29. string text4 = (string)binaryFormatter.Deserialize(fileStream);
  30. string text5 = (string)binaryFormatter.Deserialize(fileStream);
  31. float.TryParse(text5.Split(new char[]
  32. {
  33. ':'
  34. })[1], out num);
  35. DanceSetting.Settings = (SettingData)binaryFormatter.Deserialize(fileStream);
  36. fileStream.Close();
  37. }
  38. }
  39. else
  40. {
  41. using (StreamReader streamReader = new StreamReader(fileInfo.OpenRead(), Encoding.UTF8))
  42. {
  43. string text6 = streamReader.ReadLine();
  44. if (text6 == "@Dance_Setting")
  45. {
  46. string s = streamReader.ReadLine().Split(new char[]
  47. {
  48. ':'
  49. })[1];
  50. float.TryParse(s, out num);
  51. text6 = streamReader.ReadLine();
  52. }
  53. DanceSetting.Settings = JsonUtility.FromJson<SettingData>(text6);
  54. streamReader.Close();
  55. }
  56. }
  57. }
  58. catch (Exception ex)
  59. {
  60. if (num > 0f)
  61. {
  62. if (num == 1f)
  63. {
  64. Debug.Log("2017/11/22以前の設定データです");
  65. }
  66. }
  67. else
  68. {
  69. DanceSetting.Settings = new SettingData();
  70. File.Delete(file_path);
  71. Debug.LogWarning("ダンス設定読み込みに失敗したので初期化します。エラー箇所:" + ex.StackTrace);
  72. }
  73. }
  74. };
  75. string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "dance_setting_br.dat");
  76. DanceSetting.m_IsFileExist = File.Exists(text);
  77. if (DanceSetting.m_IsFileExist)
  78. {
  79. action(text, true);
  80. }
  81. else
  82. {
  83. string text2 = UTY.gameProjectPath + "\\dance_setting.set";
  84. string text3 = UTY.gameProjectPath + "\\dance_setting.dat";
  85. if (File.Exists(text2))
  86. {
  87. action(text2, false);
  88. File.Delete(text2);
  89. }
  90. else if (File.Exists(text3))
  91. {
  92. action(text3, false);
  93. File.Delete(text3);
  94. }
  95. }
  96. DanceSetting.m_IsFileCheck = true;
  97. }
  98. }
  99. private void Start()
  100. {
  101. EventDelegate.Callback callback = delegate()
  102. {
  103. GameObject gameObject = GameObject.Find("Drop-down List");
  104. if (gameObject)
  105. {
  106. int width = gameObject.GetComponentInChildren<UISprite>().width;
  107. gameObject.transform.position = UIButton.current.transform.TransformPoint(Vector3.down * this.m_PopUpOffset + Vector3.left * (float)width / 2f);
  108. }
  109. };
  110. IEnumerator enumerator = this.m_ButtonGroup.GetEnumerator();
  111. try
  112. {
  113. while (enumerator.MoveNext())
  114. {
  115. object obj = enumerator.Current;
  116. Transform transform = (Transform)obj;
  117. UIPopupList componentInChildren = transform.GetComponentInChildren<UIPopupList>();
  118. if (componentInChildren)
  119. {
  120. DanceSetting.NeedData needData = new DanceSetting.NeedData();
  121. if (transform.Find("Label"))
  122. {
  123. needData.Label = transform.Find("Label").GetComponent<UILabel>();
  124. needData.localize = needData.Label.GetComponent<Localize>();
  125. }
  126. needData.Button = transform.GetComponentInChildren<UIButton>();
  127. EventDelegate.Add(needData.Button.onClick, callback);
  128. needData.Collider = transform.GetComponentInChildren<BoxCollider>();
  129. this.m_SettingUIList.Add(componentInChildren, needData);
  130. EventDelegate.Add(componentInChildren.onChange, new EventDelegate.Callback(this.ValueSetting));
  131. this.SetUIValue(componentInChildren);
  132. }
  133. }
  134. }
  135. finally
  136. {
  137. IDisposable disposable;
  138. if ((disposable = (enumerator as IDisposable)) != null)
  139. {
  140. disposable.Dispose();
  141. }
  142. }
  143. }
  144. private void SetUIValue(UIPopupList list)
  145. {
  146. DanceSetting.UIInspectorSetting uiinspectorSetting = this.m_SettingList.SingleOrDefault((DanceSetting.UIInspectorSetting e) => e.PopUpUI == list);
  147. if (uiinspectorSetting == null)
  148. {
  149. return;
  150. }
  151. foreach (string text in list.items)
  152. {
  153. bool flag = false;
  154. bool flag2 = false;
  155. string text2 = text.Replace("\r", string.Empty);
  156. string text3 = text2;
  157. string[] array = text2.Split(new char[]
  158. {
  159. '/'
  160. });
  161. if (array != null && 1 < array.Length)
  162. {
  163. text3 = array[array.Length - 1];
  164. flag2 = true;
  165. }
  166. switch (uiinspectorSetting.MyType)
  167. {
  168. case DanceSetting.SettingType.Product:
  169. flag = this.IsProductMatch(text3);
  170. break;
  171. case DanceSetting.SettingType.Audience:
  172. flag = this.IsAudienceMatch(text3);
  173. break;
  174. case DanceSetting.SettingType.DepthofField:
  175. flag = this.IsSettingOn(text3, DanceSetting.Settings.IsDepthOfFieldOn);
  176. break;
  177. case DanceSetting.SettingType.SePlay:
  178. flag = this.IsSettingOn(text3, DanceSetting.Settings.IsSEPlay);
  179. break;
  180. case DanceSetting.SettingType.Voltage:
  181. flag = this.IsVoltageMatch(text3);
  182. break;
  183. case DanceSetting.SettingType.BlackBg:
  184. flag = this.IsSettingOn(text3, DanceSetting.Settings.IsblackBGon);
  185. break;
  186. case DanceSetting.SettingType.NoteEffect:
  187. flag = this.IsEffectLigthtMatch(text3);
  188. break;
  189. case DanceSetting.SettingType.NoteTiming:
  190. flag = this.IsTimingMatch(text3);
  191. break;
  192. case DanceSetting.SettingType.JudgeTiming:
  193. flag = this.IsJudgeTimingMatch(text3);
  194. break;
  195. case DanceSetting.SettingType.FpsCam:
  196. flag = this.IsSettingOn(text3, DanceSetting.Settings.FPSCamMode);
  197. break;
  198. case DanceSetting.SettingType.Cutin:
  199. flag = this.IsCutinMatch(text3);
  200. break;
  201. case DanceSetting.SettingType.Undress:
  202. flag = this.IsUndressFaceMatch(text3);
  203. break;
  204. case DanceSetting.SettingType.SubtitleOn:
  205. flag = this.IsSettingOn(text3, DanceSetting.Settings.IsSubtitleOn);
  206. break;
  207. case DanceSetting.SettingType.SubtitleType:
  208. flag = this.IsSubtitleTypeMatch(text3);
  209. break;
  210. }
  211. IL_1F2:
  212. if (flag)
  213. {
  214. list.value = ((!flag2) ? text3 : text2);
  215. break;
  216. }
  217. continue;
  218. goto IL_1F2;
  219. }
  220. }
  221. private bool IsProductMatch(string text)
  222. {
  223. bool result = false;
  224. switch (DanceSetting.Settings.Product)
  225. {
  226. case Product_Mgr.ProductRank.Low:
  227. result = (text == "下位");
  228. break;
  229. case Product_Mgr.ProductRank.Special:
  230. result = (text == "上位");
  231. break;
  232. case Product_Mgr.ProductRank.Normal:
  233. result = (text == "通常");
  234. break;
  235. }
  236. return result;
  237. }
  238. private bool IsAudienceMatch(string text)
  239. {
  240. bool result = false;
  241. switch (DanceSetting.Settings.Audience)
  242. {
  243. case Product_Mgr.AudienceState.Few:
  244. result = (text == "小");
  245. break;
  246. case Product_Mgr.AudienceState.Normal:
  247. result = (text == "中");
  248. break;
  249. case Product_Mgr.AudienceState.Many:
  250. result = (text == "大");
  251. break;
  252. }
  253. return result;
  254. }
  255. private bool IsSettingOn(string text, bool condition)
  256. {
  257. if (condition)
  258. {
  259. return text == "ON";
  260. }
  261. return text == "OFF";
  262. }
  263. private bool IsVoltageMatch(string text)
  264. {
  265. int num = 0;
  266. if (int.TryParse(text, out num))
  267. {
  268. return DanceSetting.Settings.Voltage == num;
  269. }
  270. if (text == "普通")
  271. {
  272. return DanceSetting.Settings.Voltage == 3;
  273. }
  274. return text == "難しい" && DanceSetting.Settings.Voltage == 4;
  275. }
  276. private bool IsCutinMatch(string text)
  277. {
  278. return DanceSetting.Settings.CutInGrade == Appeal_Mgr.ParseGrade(text);
  279. }
  280. private bool IsTimingMatch(string text)
  281. {
  282. return DanceSetting.Settings.NoteOccurTiming.ToString() == text.Replace("+", string.Empty).Replace("秒", string.Empty);
  283. }
  284. private bool IsEffectLigthtMatch(string text)
  285. {
  286. if (text == "軽量")
  287. {
  288. return DanceSetting.Settings.IsNoteEffectLight;
  289. }
  290. return !DanceSetting.Settings.IsNoteEffectLight;
  291. }
  292. private bool IsUndressFaceMatch(string text)
  293. {
  294. if (text == "通常")
  295. {
  296. return DanceSetting.Settings.UndressFaceOn;
  297. }
  298. return !DanceSetting.Settings.UndressFaceOn;
  299. }
  300. private bool IsJudgeTimingMatch(string text)
  301. {
  302. return DanceSetting.Settings.NoteJudgeTiming == float.Parse(text.Replace("秒", string.Empty));
  303. }
  304. private bool IsSubtitleTypeMatch(string text)
  305. {
  306. string @string = SubtitleDisplayManager.EnumConvert.GetString(DanceSetting.Settings.SubtitleType);
  307. return text == @string;
  308. }
  309. private void OnDestroy()
  310. {
  311. using (FileStream fileStream = new FileStream(Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "dance_setting_br.dat"), FileMode.Create, FileAccess.Write))
  312. {
  313. BinaryFormatter binaryFormatter = new BinaryFormatter();
  314. binaryFormatter.Serialize(fileStream, "@Dance_Setting");
  315. binaryFormatter.Serialize(fileStream, string.Format("Ver:{0}", 1.7f));
  316. binaryFormatter.Serialize(fileStream, DanceSetting.Settings);
  317. fileStream.Close();
  318. }
  319. DanceSetting.m_IsFileExist = true;
  320. }
  321. private void SwitchFlag(string value_text, ref bool swtch_flag)
  322. {
  323. if (value_text != null)
  324. {
  325. if (!(value_text == "ON"))
  326. {
  327. if (value_text == "OFF")
  328. {
  329. swtch_flag = false;
  330. }
  331. }
  332. else
  333. {
  334. swtch_flag = true;
  335. }
  336. }
  337. }
  338. private void SetProduct(string value_text)
  339. {
  340. Product_Mgr.ProductRank product = Product_Mgr.ProductRank.Low;
  341. if (value_text != null)
  342. {
  343. if (!(value_text == "下位"))
  344. {
  345. if (!(value_text == "通常"))
  346. {
  347. if (value_text == "上位")
  348. {
  349. product = Product_Mgr.ProductRank.Special;
  350. }
  351. }
  352. else
  353. {
  354. product = Product_Mgr.ProductRank.Normal;
  355. }
  356. }
  357. else
  358. {
  359. product = Product_Mgr.ProductRank.Low;
  360. }
  361. }
  362. DanceSetting.Settings.Product = product;
  363. }
  364. private void SetAudience(string value_text)
  365. {
  366. Product_Mgr.AudienceState audience = Product_Mgr.AudienceState.Normal;
  367. if (value_text != null)
  368. {
  369. if (!(value_text == "小"))
  370. {
  371. if (!(value_text == "中"))
  372. {
  373. if (value_text == "大")
  374. {
  375. audience = Product_Mgr.AudienceState.Many;
  376. }
  377. }
  378. else
  379. {
  380. audience = Product_Mgr.AudienceState.Normal;
  381. }
  382. }
  383. else
  384. {
  385. audience = Product_Mgr.AudienceState.Few;
  386. }
  387. }
  388. DanceSetting.Settings.Audience = audience;
  389. }
  390. private void SetVoltage(string value_text)
  391. {
  392. int voltage = 0;
  393. if (int.TryParse(value_text, out voltage))
  394. {
  395. DanceSetting.Settings.Voltage = voltage;
  396. }
  397. else if (value_text != null)
  398. {
  399. if (!(value_text == "普通"))
  400. {
  401. if (value_text == "難しい")
  402. {
  403. DanceSetting.Settings.Voltage = 4;
  404. }
  405. }
  406. else
  407. {
  408. DanceSetting.Settings.Voltage = 3;
  409. }
  410. }
  411. }
  412. private void SetCutInGrade(string value_text)
  413. {
  414. DanceSetting.Settings.CutInGrade = Appeal_Mgr.ParseGrade(value_text);
  415. }
  416. private void SetNoteTiming(string value_text)
  417. {
  418. DanceSetting.Settings.NoteOccurTiming = int.Parse(value_text.Replace("+", string.Empty));
  419. }
  420. private void SetEffectLight(string value_text)
  421. {
  422. if (value_text != null)
  423. {
  424. if (!(value_text == "通常"))
  425. {
  426. if (value_text == "軽量")
  427. {
  428. DanceSetting.Settings.IsNoteEffectLight = true;
  429. }
  430. }
  431. else
  432. {
  433. DanceSetting.Settings.IsNoteEffectLight = false;
  434. }
  435. }
  436. }
  437. private void SetUndressFace(string value_text)
  438. {
  439. if (value_text != null)
  440. {
  441. if (!(value_text == "通常"))
  442. {
  443. if (value_text == "我慢")
  444. {
  445. DanceSetting.Settings.UndressFaceOn = false;
  446. }
  447. }
  448. else
  449. {
  450. DanceSetting.Settings.UndressFaceOn = true;
  451. }
  452. }
  453. }
  454. private void SetJudgeTiming(string value_text)
  455. {
  456. DanceSetting.Settings.NoteJudgeTiming = float.Parse(value_text);
  457. }
  458. private void SetSubtitleType(string value_text)
  459. {
  460. foreach (SubtitleDisplayManager.DisplayType displayType in (SubtitleDisplayManager.DisplayType[])Enum.GetValues(typeof(SubtitleDisplayManager.DisplayType)))
  461. {
  462. string @string = SubtitleDisplayManager.EnumConvert.GetString(displayType);
  463. if (value_text == @string)
  464. {
  465. DanceSetting.Settings.SubtitleType = displayType;
  466. break;
  467. }
  468. }
  469. }
  470. private void ValueSetting()
  471. {
  472. string text = UIPopupList.current.value.Replace("\r", string.Empty);
  473. string text2 = text;
  474. bool isLocalized = UIPopupList.current.isLocalized;
  475. if (isLocalized)
  476. {
  477. string[] array = text2.Split(new char[]
  478. {
  479. '/'
  480. });
  481. if (array != null && 1 < array.Length)
  482. {
  483. text2 = array[array.Length - 1];
  484. }
  485. }
  486. DanceSetting.UIInspectorSetting uiinspectorSetting = this.m_SettingList.SingleOrDefault((DanceSetting.UIInspectorSetting e) => e.PopUpUI == UIPopupList.current);
  487. if (uiinspectorSetting == null)
  488. {
  489. return;
  490. }
  491. switch (uiinspectorSetting.MyType)
  492. {
  493. case DanceSetting.SettingType.Product:
  494. this.SetProduct(text2);
  495. break;
  496. case DanceSetting.SettingType.Audience:
  497. this.SetAudience(text2);
  498. break;
  499. case DanceSetting.SettingType.DepthofField:
  500. this.SwitchFlag(text2, ref DanceSetting.Settings.IsDepthOfFieldOn);
  501. break;
  502. case DanceSetting.SettingType.SePlay:
  503. this.SwitchFlag(text2, ref DanceSetting.Settings.IsSEPlay);
  504. break;
  505. case DanceSetting.SettingType.Voltage:
  506. this.SetVoltage(text2);
  507. break;
  508. case DanceSetting.SettingType.BlackBg:
  509. this.SwitchFlag(text2, ref DanceSetting.Settings.IsblackBGon);
  510. break;
  511. case DanceSetting.SettingType.NoteEffect:
  512. this.SetEffectLight(text2);
  513. break;
  514. case DanceSetting.SettingType.NoteTiming:
  515. this.SetNoteTiming(text2);
  516. break;
  517. case DanceSetting.SettingType.JudgeTiming:
  518. this.SetJudgeTiming(text2);
  519. break;
  520. case DanceSetting.SettingType.FpsCam:
  521. this.SwitchFlag(text2, ref DanceSetting.Settings.FPSCamMode);
  522. break;
  523. case DanceSetting.SettingType.Cutin:
  524. this.SetCutInGrade(text2);
  525. break;
  526. case DanceSetting.SettingType.Undress:
  527. this.SetUndressFace(text2);
  528. break;
  529. case DanceSetting.SettingType.SubtitleOn:
  530. this.SwitchFlag(text2, ref DanceSetting.Settings.IsSubtitleOn);
  531. break;
  532. case DanceSetting.SettingType.SubtitleType:
  533. this.SetSubtitleType(text2);
  534. break;
  535. }
  536. if (this.m_SettingUIList[UIPopupList.current].Label)
  537. {
  538. if (isLocalized && this.m_SettingUIList[UIPopupList.current].localize != null)
  539. {
  540. this.m_IsSettingChange = (this.m_SettingUIList[UIPopupList.current].localize.Term != text);
  541. this.m_SettingUIList[UIPopupList.current].localize.SetTerm(text);
  542. }
  543. else
  544. {
  545. this.m_IsSettingChange = (this.m_SettingUIList[UIPopupList.current].Label.text != text);
  546. this.m_SettingUIList[UIPopupList.current].Label.text = text;
  547. }
  548. }
  549. }
  550. public void DisSelectable()
  551. {
  552. foreach (KeyValuePair<UIPopupList, DanceSetting.NeedData> keyValuePair in this.m_SettingUIList)
  553. {
  554. if (keyValuePair.Value.Collider)
  555. {
  556. keyValuePair.Value.Collider.enabled = false;
  557. }
  558. }
  559. }
  560. public void SetUIMode(string mode = "")
  561. {
  562. RhythmAction_Mgr.DanceType nowDance = RhythmAction_Mgr.NowDance;
  563. if (nowDance != RhythmAction_Mgr.DanceType.Challenge)
  564. {
  565. if (nowDance != RhythmAction_Mgr.DanceType.VS)
  566. {
  567. if (mode.IndexOf("モード") >= 0)
  568. {
  569. this.m_ModeLabel.text = mode + "設定";
  570. }
  571. else
  572. {
  573. this.m_ModeLabel.text = mode + "モード設定";
  574. }
  575. }
  576. else
  577. {
  578. this.m_ModeLabel.text = "VSダンス設定";
  579. }
  580. }
  581. else
  582. {
  583. this.m_ModeLabel.text = "ダンスショー設定";
  584. }
  585. Localize component = this.m_ModeLabel.GetComponent<Localize>();
  586. if (component != null)
  587. {
  588. component.SetTerm("SceneDanceSelect/" + this.m_ModeLabel.text);
  589. }
  590. int num = 0;
  591. foreach (DanceSetting.UIInspectorSetting uiinspectorSetting in this.m_SettingList)
  592. {
  593. GameObject gameObject = uiinspectorSetting.PopUpUI.transform.parent.gameObject;
  594. bool flag = uiinspectorSetting.OnDanceList.Contains(RhythmAction_Mgr.NowDance);
  595. if (GameMain.Instance.VRMode)
  596. {
  597. flag &= uiinspectorSetting.UseVR;
  598. }
  599. if (Product.isJapan && uiinspectorSetting.MyType == DanceSetting.SettingType.SubtitleOn)
  600. {
  601. flag = false;
  602. }
  603. else if (uiinspectorSetting.MyType == DanceSetting.SettingType.SubtitleType)
  604. {
  605. flag &= Product.supportMultiLanguage;
  606. }
  607. gameObject.SetActive(flag);
  608. if (flag)
  609. {
  610. gameObject.transform.localPosition = Vector3.up * (this.m_FirstUIposY - this.m_UISetInterval * (float)num);
  611. num++;
  612. }
  613. }
  614. this.m_SettingUIBg.height = this.m_OrijinBgheight + num * Mathf.FloorToInt(this.m_UISetInterval);
  615. }
  616. private const string m_SettingHeader = "@Dance_Setting";
  617. private const float m_SettingVer = 1.7f;
  618. [SerializeField]
  619. [Header("設定項目設置間隔")]
  620. private float m_UISetInterval;
  621. [SerializeField]
  622. private float m_FirstUIposY;
  623. [SerializeField]
  624. [Header("ポップアップ表示オフセット")]
  625. private float m_PopUpOffset = 27.47f;
  626. [SerializeField]
  627. [Header("ボタンUIグループ")]
  628. private Transform m_ButtonGroup;
  629. [SerializeField]
  630. private UILabel m_ModeLabel;
  631. private Dictionary<UIPopupList, DanceSetting.NeedData> m_SettingUIList = new Dictionary<UIPopupList, DanceSetting.NeedData>();
  632. [SerializeField]
  633. [Header("各UI設定")]
  634. private List<DanceSetting.UIInspectorSetting> m_SettingList = new List<DanceSetting.UIInspectorSetting>
  635. {
  636. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.Product),
  637. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.Audience),
  638. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.DepthofField),
  639. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.SePlay),
  640. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.Voltage),
  641. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.BlackBg),
  642. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.NoteEffect),
  643. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.NoteTiming),
  644. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.JudgeTiming),
  645. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.FpsCam),
  646. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.Cutin),
  647. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.Undress),
  648. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.SubtitleOn),
  649. new DanceSetting.UIInspectorSetting(DanceSetting.SettingType.SubtitleType)
  650. };
  651. private bool m_IsSettingChange;
  652. [SerializeField]
  653. [Header("設定UI背景")]
  654. private UISprite m_SettingUIBg;
  655. private int m_OrijinBgheight;
  656. public static SettingData Settings = new SettingData();
  657. private static bool m_IsFileExist = false;
  658. private static bool m_IsFileCheck = false;
  659. private class NeedData
  660. {
  661. public UILabel Label;
  662. public Localize localize;
  663. public UIButton Button;
  664. public BoxCollider Collider;
  665. public string DefoValue;
  666. }
  667. public enum SettingType
  668. {
  669. Product,
  670. Audience,
  671. DepthofField,
  672. SePlay,
  673. Voltage,
  674. BlackBg,
  675. NoteEffect,
  676. NoteTiming,
  677. JudgeTiming,
  678. FpsCam,
  679. Cutin,
  680. Undress,
  681. AllRelease,
  682. SubtitleOn,
  683. SubtitleType
  684. }
  685. [Serializable]
  686. private class UIInspectorSetting
  687. {
  688. public UIInspectorSetting(DanceSetting.SettingType type)
  689. {
  690. this.MyType = type;
  691. }
  692. public DanceSetting.SettingType MyType;
  693. public UIPopupList PopUpUI;
  694. public List<RhythmAction_Mgr.DanceType> OnDanceList = new List<RhythmAction_Mgr.DanceType>();
  695. public bool UsePublic = true;
  696. public bool UseVR = true;
  697. }
  698. }