BenchSetting.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Text;
  6. using UnityEngine;
  7. public class BenchSetting : MonoBehaviour
  8. {
  9. public static BenchSetting.SettingItems Setting
  10. {
  11. get
  12. {
  13. return BenchSetting.m_UseSetting;
  14. }
  15. }
  16. private void Start()
  17. {
  18. Transform transform = GameObject.Find("SystemUI Root").transform.Find("ConfigPanel/OK");
  19. this.m_ConfigOK = transform.GetComponent<UIButton>();
  20. EventDelegate.Add(this.m_ConfigOK.onClick, new EventDelegate.Callback(this.LoadOrijinData));
  21. GameMain.Instance.MainLight.Reset();
  22. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, this.m_CamControll);
  23. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  24. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  25. {
  26. if (GameMain.Instance.CharacterMgr.GetMaid(i))
  27. {
  28. GameMain.Instance.CharacterMgr.Deactivate(i, false);
  29. }
  30. }
  31. GameMain.Instance.SoundMgr.PlayBGM(this.m_BGM, 0f, true);
  32. GameMain.Instance.BgMgr.ChangeBg(this.m_BGname);
  33. ShootCutInTex.TextureClear(DanceBattle_Mgr.CharaType.Player);
  34. ShootCutInTex.TextureClear(DanceBattle_Mgr.CharaType.Enemy);
  35. RhythmAction_Mgr.SetDanceType(RhythmAction_Mgr.DanceType.BenchMark);
  36. DanceSelect.BenchMarkInit();
  37. this.UIInit();
  38. this.LoadOrijinData();
  39. Action<string> action = delegate(string file_path)
  40. {
  41. string text3 = string.Empty;
  42. float num = -1f;
  43. FileInfo fileInfo = new FileInfo(file_path);
  44. try
  45. {
  46. using (StreamReader streamReader = new StreamReader(fileInfo.OpenRead(), Encoding.UTF8))
  47. {
  48. text3 = streamReader.ReadLine();
  49. if (text3 == "@Bench_Setting")
  50. {
  51. string text4 = streamReader.ReadLine();
  52. if (text4.IndexOf(":") >= 0)
  53. {
  54. text4 = text4.Split(new char[]
  55. {
  56. ':'
  57. })[1];
  58. }
  59. else
  60. {
  61. text4 = 1.1f.ToString();
  62. }
  63. float.TryParse(text4, out num);
  64. string json = streamReader.ReadLine();
  65. BenchSetting.m_UseSetting = JsonUtility.FromJson<BenchSetting.SettingItems>(json);
  66. }
  67. streamReader.Close();
  68. }
  69. }
  70. catch (Exception ex)
  71. {
  72. if (string.IsNullOrEmpty(text3) || text3 != "@Bench_Setting")
  73. {
  74. Debug.Log("ヘッダー書き込み前のデータです");
  75. }
  76. else if (num > 0f)
  77. {
  78. if (num == 1f)
  79. {
  80. Debug.Log("2017/11/22以前の設定データです");
  81. }
  82. }
  83. else
  84. {
  85. Debug.LogError("DanceSetting.cs:ファイル読み込みエラー。エラー箇所:" + ex.StackTrace);
  86. }
  87. }
  88. this.UpdateSettingUI(BenchSetting.m_UseSetting);
  89. };
  90. string text = UTY.gameProjectPath + "\\benchmark_setting.dat";
  91. if (File.Exists(text))
  92. {
  93. action(text);
  94. }
  95. else
  96. {
  97. string text2 = UTY.gameProjectPath + "\\benchmark_setting.set";
  98. if (File.Exists(text2))
  99. {
  100. action(text2);
  101. File.Delete(text2);
  102. }
  103. }
  104. NDebug.Assert(GameMain.Instance.ScriptMgr.adv_kag.tag_backup.ContainsKey("label"), "実行時に飛ぶラベルが未指定です");
  105. this.m_StartLabel = GameMain.Instance.ScriptMgr.adv_kag.tag_backup["label"];
  106. this.m_LoopCheckmark.SetActive(BenchSetting.m_UseSetting.IsLoopMode);
  107. EventDelegate.Add(this.m_LoopModeUI.onClick, new EventDelegate.Callback(this.SwitchLoopMode));
  108. GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, false, true, default(Color));
  109. }
  110. private void OnDestroy()
  111. {
  112. EventDelegate.Remove(this.m_ConfigOK.onClick, new EventDelegate.Callback(this.LoadOrijinData));
  113. if (this.m_JumpLabel == this.m_StartLabel)
  114. {
  115. DanceSetting.Settings.IsDepthOfFieldOn = BenchSetting.m_UseSetting.DepthFieldOn;
  116. DanceSetting.Settings.CutInGrade = BenchSetting.m_UseSetting.CutInGrade;
  117. DanceSetting.Settings.IsSEPlay = BenchSetting.m_UseSetting.NoteSePlay;
  118. Dance_Note.IsAutoPlay = true;
  119. ShootCutInTex.SetEnemyCutInTex(false);
  120. ShootCutInTex.SetPlayerCutInTex();
  121. }
  122. else
  123. {
  124. BenchSetting.SettingRecet();
  125. }
  126. FileInfo fileInfo = new FileInfo(UTY.gameProjectPath + "\\benchmark_setting.dat");
  127. using (StreamWriter streamWriter = new StreamWriter(fileInfo.Create()))
  128. {
  129. streamWriter.WriteLine("@Bench_Setting");
  130. streamWriter.WriteLine("Ver:" + 1.1f);
  131. streamWriter.WriteLine(JsonUtility.ToJson(BenchSetting.m_UseSetting));
  132. streamWriter.Close();
  133. }
  134. }
  135. private void SwitchLoopMode()
  136. {
  137. BenchSetting.m_UseSetting.IsLoopMode = !BenchSetting.m_UseSetting.IsLoopMode;
  138. this.m_LoopCheckmark.SetActive(BenchSetting.m_UseSetting.IsLoopMode);
  139. }
  140. private void UIInit()
  141. {
  142. EventDelegate.Add(this.m_FullScreenOn.OnButton.onClick, new EventDelegate.Callback(this.SetFullScreen));
  143. EventDelegate.Add(this.m_FullScreenOn.OffButton.onClick, new EventDelegate.Callback(this.SetFullScreen));
  144. foreach (Size<int> size in this.GetResolutions())
  145. {
  146. this.m_Resolution.items.Add(this.ToResolutionOption(size));
  147. }
  148. EventDelegate.Add(this.m_Resolution.onChange, new EventDelegate.Callback(this.SetResolution));
  149. this.PopupLabelLink(this.m_Resolution);
  150. IEnumerator enumerator2 = Enum.GetValues(typeof(CMSystem.AntiAliasType)).GetEnumerator();
  151. try
  152. {
  153. while (enumerator2.MoveNext())
  154. {
  155. object obj = enumerator2.Current;
  156. if ((CMSystem.AntiAliasType)obj != CMSystem.AntiAliasType.MAX)
  157. {
  158. this.m_Antialiasing.items.Add(obj.ToString());
  159. }
  160. }
  161. }
  162. finally
  163. {
  164. IDisposable disposable;
  165. if ((disposable = (enumerator2 as IDisposable)) != null)
  166. {
  167. disposable.Dispose();
  168. }
  169. }
  170. EventDelegate.Add(this.m_Antialiasing.onChange, new EventDelegate.Callback(this.SetAntialiasing));
  171. this.PopupLabelLink(this.m_Antialiasing);
  172. IEnumerator enumerator3 = Enum.GetValues(typeof(CMSystem.ShadowQualityType)).GetEnumerator();
  173. try
  174. {
  175. while (enumerator3.MoveNext())
  176. {
  177. object obj2 = enumerator3.Current;
  178. this.m_ShadowQuality.items.Add(obj2.ToString());
  179. }
  180. }
  181. finally
  182. {
  183. IDisposable disposable2;
  184. if ((disposable2 = (enumerator3 as IDisposable)) != null)
  185. {
  186. disposable2.Dispose();
  187. }
  188. }
  189. EventDelegate.Add(this.m_ShadowQuality.onChange, new EventDelegate.Callback(this.SetShadowQuality));
  190. this.PopupLabelLink(this.m_ShadowQuality);
  191. IEnumerator enumerator4 = Enum.GetValues(typeof(CMSystem.TextureQualityType)).GetEnumerator();
  192. try
  193. {
  194. while (enumerator4.MoveNext())
  195. {
  196. object obj3 = enumerator4.Current;
  197. this.m_TextureQuality.items.Add(obj3.ToString());
  198. }
  199. }
  200. finally
  201. {
  202. IDisposable disposable3;
  203. if ((disposable3 = (enumerator4 as IDisposable)) != null)
  204. {
  205. disposable3.Dispose();
  206. }
  207. }
  208. EventDelegate.Add(this.m_TextureQuality.onChange, new EventDelegate.Callback(this.SetTextureQuality));
  209. this.PopupLabelLink(this.m_TextureQuality);
  210. EventDelegate.Add(this.m_BloomValue.onChange, new EventDelegate.Callback(this.SetBloomValue));
  211. EventDelegate.Add(this.m_DepthFieldOn.OnButton.onClick, new EventDelegate.Callback(this.SetDepthField));
  212. EventDelegate.Add(this.m_DepthFieldOn.OffButton.onClick, new EventDelegate.Callback(this.SetDepthField));
  213. IEnumerator enumerator5 = Enum.GetValues(typeof(Appeal_Mgr.CutInGrade)).GetEnumerator();
  214. try
  215. {
  216. while (enumerator5.MoveNext())
  217. {
  218. object obj4 = enumerator5.Current;
  219. Appeal_Mgr.CutInGrade grade = (Appeal_Mgr.CutInGrade)obj4;
  220. this.m_CutInGrade.items.Add(Appeal_Mgr.GradeTostring(grade));
  221. }
  222. }
  223. finally
  224. {
  225. IDisposable disposable4;
  226. if ((disposable4 = (enumerator5 as IDisposable)) != null)
  227. {
  228. disposable4.Dispose();
  229. }
  230. }
  231. EventDelegate.Add(this.m_CutInGrade.onChange, new EventDelegate.Callback(this.SetCutInGrade));
  232. this.PopupLabelLink(this.m_CutInGrade);
  233. EventDelegate.Add(this.m_NoteSePlay.OnButton.onClick, new EventDelegate.Callback(this.SetNoteSEPlay));
  234. EventDelegate.Add(this.m_NoteSePlay.OffButton.onClick, new EventDelegate.Callback(this.SetNoteSEPlay));
  235. EventDelegate.Add(this.m_StartButton.onClick, new EventDelegate.Callback(this.BenchStart));
  236. EventDelegate.Add(this.m_BackButton.onClick, new EventDelegate.Callback(this.TitleBack));
  237. }
  238. private void BenchStart()
  239. {
  240. this.m_JumpNextScene = true;
  241. UICamera.InputEnable = false;
  242. this.m_JumpLabel = this.m_StartLabel;
  243. GameMain.Instance.MainCamera.FadeOut(0.5f, false, delegate
  244. {
  245. UICamera.InputEnable = true;
  246. GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(this.m_JumpLabel);
  247. GameMain.Instance.ScriptMgr.adv_kag.Exec();
  248. }, true, default(Color));
  249. }
  250. private void TitleBack()
  251. {
  252. this.m_JumpNextScene = true;
  253. UICamera.InputEnable = false;
  254. GameMain.Instance.MainCamera.FadeOut(0.5f, false, delegate
  255. {
  256. UICamera.InputEnable = true;
  257. GameMain.Instance.LoadScene("SceneToTitle");
  258. }, true, default(Color));
  259. }
  260. private void PopupLabelLink(UIPopupList popup)
  261. {
  262. if (!this.m_PopupLabelPair.ContainsKey(popup))
  263. {
  264. this.m_PopupLabelPair.Add(popup, popup.transform.Find("Label").GetComponent<UILabel>());
  265. }
  266. }
  267. private List<Size<int>> GetResolutions()
  268. {
  269. List<Size<int>> screenSizeList = GameMain.Instance.CMSystem.GetScreenSizeList();
  270. Size<int> screenSizeNow = GameMain.Instance.CMSystem.GetScreenSizeNow();
  271. if (!screenSizeList.Contains(screenSizeNow))
  272. {
  273. screenSizeList.Add(screenSizeNow);
  274. }
  275. return screenSizeList;
  276. }
  277. private string ToResolutionOption(Size<int> size)
  278. {
  279. return string.Format("{0}x{1}", size.width, size.height);
  280. }
  281. private void UpdateSettingUI(BenchSetting.SettingItems setting_data)
  282. {
  283. BenchSetting.m_UseSetting.IsFullScreen = setting_data.IsFullScreen;
  284. this.SwitchUIActive(this.m_FullScreenOn, setting_data.IsFullScreen);
  285. this.m_Resolution.value = this.ToResolutionOption(new Size<int>(setting_data.ResolutionX, setting_data.ResolutionY));
  286. this.m_Antialiasing.value = setting_data.Antialiasing.ToString();
  287. this.m_ShadowQuality.value = setting_data.ShadowQuality.ToString();
  288. this.m_TextureQuality.value = setting_data.TextureQuality.ToString();
  289. this.m_BloomValue.value = (float)setting_data.BloomValue / 100f;
  290. BenchSetting.m_UseSetting.DepthFieldOn = setting_data.DepthFieldOn;
  291. this.SwitchUIActive(this.m_DepthFieldOn, setting_data.DepthFieldOn);
  292. this.m_CutInGrade.value = Appeal_Mgr.GradeTostring(setting_data.CutInGrade);
  293. BenchSetting.m_UseSetting.NoteSePlay = setting_data.NoteSePlay;
  294. this.SwitchUIActive(this.m_NoteSePlay, setting_data.NoteSePlay);
  295. }
  296. private void LoadOrijinData()
  297. {
  298. BenchSetting.OrijinSetting.IsFullScreen = GameMain.Instance.CMSystem.FullScreen;
  299. BenchSetting.OrijinSetting.ResolutionX = GameMain.Instance.CMSystem.GetScreenSizeNow().width;
  300. BenchSetting.OrijinSetting.ResolutionY = GameMain.Instance.CMSystem.GetScreenSizeNow().height;
  301. BenchSetting.OrijinSetting.Antialiasing = GameMain.Instance.CMSystem.Antialias;
  302. BenchSetting.OrijinSetting.ShadowQuality = GameMain.Instance.CMSystem.ShadowQuality;
  303. BenchSetting.OrijinSetting.TextureQuality = GameMain.Instance.CMSystem.TextureQuality;
  304. BenchSetting.OrijinSetting.BloomValue = GameMain.Instance.CMSystem.BloomValue;
  305. BenchSetting.OrijinSetting.DepthFieldOn = DanceSetting.Settings.IsDepthOfFieldOn;
  306. BenchSetting.OrijinSetting.CutInGrade = DanceSetting.Settings.CutInGrade;
  307. BenchSetting.OrijinSetting.NoteSePlay = DanceSetting.Settings.IsSEPlay;
  308. this.UpdateSettingUI(BenchSetting.OrijinSetting);
  309. }
  310. private void SwitchUIActive(BenchSetting.Buttonpair pair)
  311. {
  312. if (UIButton.current == pair.OnButton)
  313. {
  314. this.SwitchUIActive(pair.OnButton, pair.OffButton);
  315. }
  316. else if (UIButton.current == pair.OffButton)
  317. {
  318. this.SwitchUIActive(pair.OffButton, pair.OnButton);
  319. }
  320. }
  321. private void SwitchUIActive(BenchSetting.Buttonpair pair, bool active_on)
  322. {
  323. this.SwitchUIActive(pair.OnButton, pair.OffButton, active_on);
  324. }
  325. private void SwitchUIActive(UIButton active, UIButton diactive)
  326. {
  327. active.defaultColor = this.m_ButtonActive;
  328. diactive.defaultColor = this.m_ButtonDiactive;
  329. }
  330. private void SwitchUIActive(UIButton active, UIButton diactive, bool active_on)
  331. {
  332. if (active_on)
  333. {
  334. this.SwitchUIActive(active, diactive);
  335. }
  336. else
  337. {
  338. this.SwitchUIActive(diactive, active);
  339. }
  340. }
  341. private void SetFullScreen()
  342. {
  343. if (UIButton.current != this.m_FullScreenOn.OnButton && UIButton.current != this.m_FullScreenOn.OffButton)
  344. {
  345. return;
  346. }
  347. BenchSetting.m_UseSetting.IsFullScreen = (UIButton.current == this.m_FullScreenOn.OnButton);
  348. this.SwitchUIActive(this.m_FullScreenOn);
  349. GameMain.Instance.CMSystem.FullScreen = BenchSetting.m_UseSetting.IsFullScreen;
  350. GameMain.Instance.CMSystem.ConfigScreenApply();
  351. }
  352. private void SetResolution()
  353. {
  354. if (UIPopupList.current != this.m_Resolution)
  355. {
  356. return;
  357. }
  358. string[] array = UIPopupList.current.value.Split(new char[]
  359. {
  360. 'x'
  361. });
  362. BenchSetting.m_UseSetting.ResolutionX = int.Parse(array[0]);
  363. BenchSetting.m_UseSetting.ResolutionY = int.Parse(array[1]);
  364. this.m_PopupLabelPair[UIPopupList.current].text = UIPopupList.current.value;
  365. GameMain.Instance.CMSystem.SetScreenSize(new Size<int>(BenchSetting.m_UseSetting.ResolutionX, BenchSetting.m_UseSetting.ResolutionY));
  366. GameMain.Instance.CMSystem.ConfigScreenApply();
  367. }
  368. private void SetAntialiasing()
  369. {
  370. if (UIPopupList.current != this.m_Antialiasing)
  371. {
  372. return;
  373. }
  374. BenchSetting.m_UseSetting.Antialiasing = (CMSystem.AntiAliasType)Enum.Parse(typeof(CMSystem.AntiAliasType), UIPopupList.current.value);
  375. this.m_PopupLabelPair[UIPopupList.current].text = UIPopupList.current.value;
  376. GameMain.Instance.CMSystem.Antialias = BenchSetting.m_UseSetting.Antialiasing;
  377. GameMain.Instance.CMSystem.ConfigScreenApply();
  378. }
  379. private void SetShadowQuality()
  380. {
  381. if (UIPopupList.current != this.m_ShadowQuality)
  382. {
  383. return;
  384. }
  385. BenchSetting.m_UseSetting.ShadowQuality = (CMSystem.ShadowQualityType)Enum.Parse(typeof(CMSystem.ShadowQualityType), UIPopupList.current.value);
  386. this.m_PopupLabelPair[UIPopupList.current].text = UIPopupList.current.value;
  387. GameMain.Instance.CMSystem.ShadowQuality = BenchSetting.m_UseSetting.ShadowQuality;
  388. GameMain.Instance.CMSystem.ConfigScreenApply();
  389. }
  390. private void SetTextureQuality()
  391. {
  392. if (UIPopupList.current != this.m_TextureQuality)
  393. {
  394. return;
  395. }
  396. BenchSetting.m_UseSetting.TextureQuality = (CMSystem.TextureQualityType)Enum.Parse(typeof(CMSystem.TextureQualityType), UIPopupList.current.value);
  397. this.m_PopupLabelPair[UIPopupList.current].text = UIPopupList.current.value;
  398. GameMain.Instance.CMSystem.TextureQuality = BenchSetting.m_UseSetting.TextureQuality;
  399. GameMain.Instance.CMSystem.ConfigScreenApply();
  400. }
  401. private void SetBloomValue()
  402. {
  403. if (UIProgressBar.current != this.m_BloomValue)
  404. {
  405. return;
  406. }
  407. BenchSetting.m_UseSetting.BloomValue = Mathf.FloorToInt(UIProgressBar.current.value * 100f);
  408. this.m_BloomFacter.text = BenchSetting.m_UseSetting.BloomValue.ToString();
  409. GameMain.Instance.CMSystem.BloomValue = BenchSetting.m_UseSetting.BloomValue;
  410. GameMain.Instance.CMSystem.ConfigScreenApply();
  411. }
  412. private void SetDepthField()
  413. {
  414. if (UIButton.current != this.m_DepthFieldOn.OnButton && UIButton.current != this.m_DepthFieldOn.OffButton)
  415. {
  416. return;
  417. }
  418. BenchSetting.m_UseSetting.DepthFieldOn = (UIButton.current == this.m_DepthFieldOn.OnButton);
  419. this.SwitchUIActive(this.m_DepthFieldOn);
  420. }
  421. private void SetCutInGrade()
  422. {
  423. if (UIPopupList.current != this.m_CutInGrade)
  424. {
  425. return;
  426. }
  427. BenchSetting.m_UseSetting.CutInGrade = Appeal_Mgr.ParseGrade(UIPopupList.current.value);
  428. this.m_PopupLabelPair[UIPopupList.current].text = UIPopupList.current.value;
  429. }
  430. private void SetNoteSEPlay()
  431. {
  432. if (UIButton.current != this.m_NoteSePlay.OnButton && UIButton.current != this.m_NoteSePlay.OffButton)
  433. {
  434. return;
  435. }
  436. BenchSetting.m_UseSetting.NoteSePlay = (UIButton.current == this.m_NoteSePlay.OnButton);
  437. this.SwitchUIActive(this.m_NoteSePlay);
  438. }
  439. public static void SettingRecet()
  440. {
  441. GameMain.Instance.CMSystem.FullScreen = BenchSetting.OrijinSetting.IsFullScreen;
  442. GameMain.Instance.CMSystem.SetScreenSize(new Size<int>(BenchSetting.OrijinSetting.ResolutionX, BenchSetting.OrijinSetting.ResolutionY));
  443. GameMain.Instance.CMSystem.Antialias = BenchSetting.OrijinSetting.Antialiasing;
  444. GameMain.Instance.CMSystem.ShadowQuality = BenchSetting.OrijinSetting.ShadowQuality;
  445. GameMain.Instance.CMSystem.TextureQuality = BenchSetting.OrijinSetting.TextureQuality;
  446. GameMain.Instance.CMSystem.BloomValue = BenchSetting.OrijinSetting.BloomValue;
  447. GameMain.Instance.CMSystem.ConfigScreenApply();
  448. DanceSetting.Settings.IsDepthOfFieldOn = BenchSetting.OrijinSetting.DepthFieldOn;
  449. DanceSetting.Settings.CutInGrade = BenchSetting.OrijinSetting.CutInGrade;
  450. DanceSetting.Settings.IsSEPlay = BenchSetting.OrijinSetting.NoteSePlay;
  451. Dance_Note.IsAutoPlay = false;
  452. }
  453. public static void SettingApplay()
  454. {
  455. GameMain.Instance.CMSystem.FullScreen = BenchSetting.m_UseSetting.IsFullScreen;
  456. GameMain.Instance.CMSystem.SetScreenSize(new Size<int>(BenchSetting.m_UseSetting.ResolutionX, BenchSetting.m_UseSetting.ResolutionY));
  457. GameMain.Instance.CMSystem.Antialias = BenchSetting.m_UseSetting.Antialiasing;
  458. GameMain.Instance.CMSystem.ShadowQuality = BenchSetting.m_UseSetting.ShadowQuality;
  459. GameMain.Instance.CMSystem.TextureQuality = BenchSetting.m_UseSetting.TextureQuality;
  460. GameMain.Instance.CMSystem.BloomValue = BenchSetting.m_UseSetting.BloomValue;
  461. GameMain.Instance.CMSystem.ConfigScreenApply();
  462. DanceSetting.Settings.IsDepthOfFieldOn = BenchSetting.m_UseSetting.DepthFieldOn;
  463. DanceSetting.Settings.CutInGrade = BenchSetting.m_UseSetting.CutInGrade;
  464. DanceSetting.Settings.IsSEPlay = BenchSetting.m_UseSetting.NoteSePlay;
  465. Dance_Note.IsAutoPlay = true;
  466. }
  467. private const string m_SettingHeader = "@Bench_Setting";
  468. private const float m_SettingVer = 1.1f;
  469. [SerializeField]
  470. private bool m_CamControll = true;
  471. [SerializeField]
  472. private string m_BGM = "BGM020.ogg";
  473. [SerializeField]
  474. private string m_BGname = "LiveStage";
  475. [SerializeField]
  476. private Color m_ButtonActive = Color.white;
  477. [SerializeField]
  478. private Color m_ButtonDiactive = Color.white;
  479. [SerializeField]
  480. [Header("スクリーンモード")]
  481. private BenchSetting.Buttonpair m_FullScreenOn;
  482. [SerializeField]
  483. [Header("画面解像度")]
  484. private UIPopupList m_Resolution;
  485. [SerializeField]
  486. [Header("アンチエイリアス")]
  487. private UIPopupList m_Antialiasing;
  488. [SerializeField]
  489. [Header("影のクオリティ")]
  490. private UIPopupList m_ShadowQuality;
  491. [SerializeField]
  492. [Header("テクスチャクオリティ")]
  493. private UIPopupList m_TextureQuality;
  494. [SerializeField]
  495. [Header("ブルーム")]
  496. private UISlider m_BloomValue;
  497. [SerializeField]
  498. private UILabel m_BloomFacter;
  499. [SerializeField]
  500. [Header("被写界深度")]
  501. private BenchSetting.Buttonpair m_DepthFieldOn;
  502. [SerializeField]
  503. [Header("カットイン演出段階")]
  504. private UIPopupList m_CutInGrade;
  505. [SerializeField]
  506. [Header("ノートSE再生")]
  507. private BenchSetting.Buttonpair m_NoteSePlay;
  508. [SerializeField]
  509. [Header("開始ボタン")]
  510. private UIButton m_StartButton;
  511. [SerializeField]
  512. [Header("戻るボタン")]
  513. private UIButton m_BackButton;
  514. [SerializeField]
  515. [Header("ループモード用UI")]
  516. private UIButton m_LoopModeUI;
  517. [SerializeField]
  518. private GameObject m_LoopCheckmark;
  519. private static BenchSetting.SettingItems m_UseSetting = new BenchSetting.SettingItems();
  520. private Dictionary<UIPopupList, UILabel> m_PopupLabelPair = new Dictionary<UIPopupList, UILabel>();
  521. private string m_JumpLabel = string.Empty;
  522. private string m_StartLabel = string.Empty;
  523. private static BenchSetting.SettingItems OrijinSetting = new BenchSetting.SettingItems();
  524. private UIButton m_ConfigOK;
  525. private bool m_JumpNextScene;
  526. [Serializable]
  527. private class Buttonpair
  528. {
  529. public UIButton OnButton;
  530. public UIButton OffButton;
  531. }
  532. [Serializable]
  533. public class SettingItems
  534. {
  535. public bool IsFullScreen;
  536. public int ResolutionX;
  537. public int ResolutionY;
  538. public CMSystem.AntiAliasType Antialiasing;
  539. public CMSystem.ShadowQualityType ShadowQuality;
  540. public CMSystem.TextureQualityType TextureQuality;
  541. public int BloomValue;
  542. public bool DepthFieldOn;
  543. public Appeal_Mgr.CutInGrade CutInGrade;
  544. public bool NoteSePlay;
  545. public bool IsLoopMode;
  546. }
  547. }