SystemShortcut.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. using System;
  2. using System.Collections.Generic;
  3. using I2.Loc;
  4. using UnityEngine;
  5. using UnityEngine.SceneManagement;
  6. public class SystemShortcut : MonoBehaviour
  7. {
  8. private void Awake()
  9. {
  10. this.m_uiCam = base.gameObject.transform.parent.Find("Camera").GetComponent<Camera>();
  11. this.m_uiPanel = base.gameObject.GetComponent<UIPanel>();
  12. this.m_goBase = UTY.GetChildObject(base.gameObject, "Base", false);
  13. this.m_uiBase = this.m_goBase.GetComponent<UISprite>();
  14. this.m_hitArea = this.m_goBase.GetComponent<BoxCollider>();
  15. this.m_goBaseVR = UTY.GetChildObject(base.gameObject, "BaseVR", false);
  16. this.m_uiBaseVR = this.m_goBaseVR.GetComponent<UISprite>();
  17. this.m_goBaseVR.SetActive(false);
  18. this.m_goGear = UTY.GetChildObject(base.gameObject, "Gear", false);
  19. this.m_uiGear = this.m_goGear.GetComponent<UIButton>();
  20. EventDelegate.Add(this.m_uiGear.onClick, new EventDelegate.Callback(this.OnClick_Gear));
  21. this.m_aryDgOnClick[0] = new EventDelegate(new EventDelegate.Callback(this.OnClick_Config));
  22. this.m_aryDgOnClick[1] = new EventDelegate(new EventDelegate.Callback(this.OnClick_Exit));
  23. this.m_aryDgOnClick[2] = new EventDelegate(new EventDelegate.Callback(this.OnClick_Info));
  24. this.m_aryDgOnClick[3] = new EventDelegate(new EventDelegate.Callback(this.OnClick_Ss));
  25. this.m_aryDgOnClick[4] = new EventDelegate(new EventDelegate.Callback(this.OnClick_SsUi));
  26. this.m_aryDgOnClick[5] = new EventDelegate(new EventDelegate.Callback(this.OnClick_ToTitle));
  27. this.m_aryDgOnClick[6] = new EventDelegate(new EventDelegate.Callback(this.OnClick_Shop));
  28. this.m_aryDgOnClick[7] = new EventDelegate(new EventDelegate.Callback(this.OnClick_VRCommHome));
  29. this.m_aryDgOnClick[8] = new EventDelegate(new EventDelegate.Callback(this.OnClick_VRHelp));
  30. this.m_aryDgOnClick[9] = new EventDelegate(new EventDelegate.Callback(this.OnClick_Help));
  31. this.m_aryDgOnClick[10] = new EventDelegate(new EventDelegate.Callback(this.OnClick_VRAvatar));
  32. this.m_aryDgOnClick[11] = new EventDelegate(new EventDelegate.Callback(this.OnClickDictionary));
  33. Dictionary<int, string> dictionary = new Dictionary<int, string>();
  34. dictionary.Add(0, "System/ショートカット/コンフィグ");
  35. dictionary.Add(3, "System/ショートカット/UI無し スクリーンショット");
  36. dictionary.Add(4, "System/ショートカット/UI有り スクリーンショット");
  37. if (Product.lockDLCSiteLink)
  38. {
  39. dictionary.Add(6, "System/ショートカット/オフィシャルサイト");
  40. }
  41. else
  42. {
  43. dictionary.Add(6, "System/ショートカット/ショップ");
  44. }
  45. dictionary.Add(5, "System/ショートカット/タイトルへ");
  46. dictionary.Add(2, "System/ショートカット/ゲーム情報");
  47. dictionary.Add(1, "System/ショートカット/終了");
  48. dictionary.Add(7, "System/ショートカット/エンパイアクラブに帰る");
  49. dictionary.Add(8, "System/ショートカット/VRヘルプ");
  50. dictionary.Add(9, "System/ショートカット/シーンのヘルプ");
  51. dictionary.Add(10, "System/ショートカット/バーチャル アバター スタジオ");
  52. dictionary.Add(11, "System/ショートカット/辞書");
  53. for (int i = 0; i < this.m_aryObjPath.Length; i++)
  54. {
  55. this.m_goBtn[i] = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[i], false);
  56. this.m_uiBtn[i] = this.m_goBtn[i].GetComponent<UIButton>();
  57. EventDelegate.Add(this.m_uiBtn[i].onClick, this.m_aryDgOnClick[i]);
  58. if (dictionary.ContainsKey(i))
  59. {
  60. UIEventTrigger component = this.m_goBtn[i].GetComponent<UIEventTrigger>();
  61. string text = dictionary[i];
  62. EventDelegate.Add(component.onHoverOver, delegate()
  63. {
  64. this.VisibleExplanation(text, true);
  65. });
  66. EventDelegate.Add(component.onHoverOut, delegate()
  67. {
  68. this.VisibleExplanation(text, false);
  69. });
  70. EventDelegate.Add(component.onDragStart, delegate()
  71. {
  72. this.VisibleExplanation(text, false);
  73. });
  74. }
  75. }
  76. UIWidget uiBaseVR = this.m_uiBaseVR;
  77. Color color = new Color(1f, 1f, 1f, 0f);
  78. this.m_uiBase.color = color;
  79. uiBaseVR.color = color;
  80. this.m_uiGear.defaultColor = new Color(1f, 1f, 1f, 0.3f);
  81. this.m_spriteExplanation = UTY.GetChildObject(base.gameObject, "Explanation", false).GetComponent<UISprite>();
  82. this.m_labelExplanation = UTY.GetChildObject(this.m_spriteExplanation.gameObject, "Value", false).GetComponent<UILabel>();
  83. this.m_spriteExplanation.gameObject.SetActive(false);
  84. this.dicBGSizeType.Add(SystemShortcut.BGSizeType.Long, 380);
  85. this.dicBGSizeType.Add(SystemShortcut.BGSizeType.Short, 340);
  86. int num = 0;
  87. if (Product.isJapan)
  88. {
  89. GameObject childObject = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[11], false);
  90. if (childObject != null)
  91. {
  92. childObject.SetActive(false);
  93. num++;
  94. }
  95. }
  96. if (GameMain.Instance.CMSystem.NetUse)
  97. {
  98. int num2 = this.dicBGSizeType[SystemShortcut.BGSizeType.Long];
  99. }
  100. else
  101. {
  102. int num2 = this.dicBGSizeType[SystemShortcut.BGSizeType.Short];
  103. GameObject childObject2 = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[6], false);
  104. childObject2.SetActive(false);
  105. num++;
  106. }
  107. this.m_uiBase.width = 420 - num * 40;
  108. UTY.GetChildObject(this.m_goBase, "Grid", false).GetComponent<UIGrid>().repositionNow = true;
  109. SceneManager.activeSceneChanged += this.OnActiveSceneChanged;
  110. SceneManager.sceneUnloaded += this.OnSceneUnloaded;
  111. if (Product.lockDLCSiteLink)
  112. {
  113. this.m_goBtn[6].GetComponentInChildren<UIButton>().normalSprite = "systemicon_home";
  114. }
  115. }
  116. private void OnClick_Gear()
  117. {
  118. if (this.m_bEnableBase)
  119. {
  120. this.BaseClose();
  121. }
  122. else if (!this.m_bEnableBase)
  123. {
  124. this.BaseOpen();
  125. }
  126. }
  127. private void BaseClose()
  128. {
  129. if (this.m_bEnableBase)
  130. {
  131. this.m_bEnableBase = false;
  132. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  133. {
  134. "from",
  135. this.m_uiBase.color.a,
  136. "to",
  137. 0f,
  138. "time",
  139. 0.25f,
  140. "onUpdate",
  141. "UpdateBase"
  142. }));
  143. this.m_uiGear.defaultColor = new Color(1f, 1f, 1f, 0.3f);
  144. }
  145. }
  146. private void BaseOpen()
  147. {
  148. if (!this.m_bEnableBase)
  149. {
  150. this.m_bEnableBase = true;
  151. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  152. {
  153. "from",
  154. this.m_uiBase.color.a,
  155. "to",
  156. 1f,
  157. "time",
  158. 0.25f,
  159. "onUpdate",
  160. "UpdateBase"
  161. }));
  162. this.m_uiGear.defaultColor = new Color(1f, 1f, 1f, 1f);
  163. }
  164. }
  165. private void UpdateBase(float f_fValue)
  166. {
  167. UIWidget uiBaseVR = this.m_uiBaseVR;
  168. Color color = new Color(1f, 1f, 1f, f_fValue);
  169. this.m_uiBase.color = color;
  170. uiBaseVR.color = color;
  171. }
  172. private void PanelClose()
  173. {
  174. if (this.m_bEnablePanel)
  175. {
  176. this.m_bEnablePanel = false;
  177. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  178. {
  179. "from",
  180. this.m_uiPanel.alpha,
  181. "to",
  182. 0f,
  183. "time",
  184. 0.25f,
  185. "onUpdate",
  186. "UpdatePanel"
  187. }));
  188. }
  189. }
  190. private void PanelOpen()
  191. {
  192. if (!this.m_bEnablePanel)
  193. {
  194. this.m_bEnablePanel = true;
  195. iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
  196. {
  197. "from",
  198. this.m_uiPanel.alpha,
  199. "to",
  200. 1f,
  201. "time",
  202. 0.25f,
  203. "onUpdate",
  204. "UpdatePanel"
  205. }));
  206. }
  207. }
  208. private void UpdatePanel(float f_fValue)
  209. {
  210. this.m_uiPanel.alpha = f_fValue;
  211. }
  212. private void OnClick_Config()
  213. {
  214. if (!this.m_bEnablePanel || BaseMgr<ConfigMgr>.Instance.IsOpenConfigPanel())
  215. {
  216. return;
  217. }
  218. BaseMgr<ConfigMgr>.Instance.OpenConfigPanel();
  219. if (ConfigVRCtrl.IsOpen())
  220. {
  221. ConfigVRCtrl.Close(true);
  222. }
  223. this.BaseClose();
  224. }
  225. private void OnClick_Exit()
  226. {
  227. if (!this.m_bEnablePanel)
  228. {
  229. return;
  230. }
  231. GameMain.Instance.SysDlg.ShowFromLanguageTerm("Dialog/終了しますか?", null, SystemDialog.TYPE.OK_CANCEL, new SystemDialog.OnClick(this.OnToEnd), new SystemDialog.OnClick(this.OnCancel));
  232. this.BaseClose();
  233. }
  234. private void OnClick_Info()
  235. {
  236. if (!this.m_bEnablePanel)
  237. {
  238. return;
  239. }
  240. string text = Product.gameTitle;
  241. if (text.IndexOf("It's") != -1)
  242. {
  243. text = text.Replace("It's", "\nIt's");
  244. }
  245. string text2 = "カスタムメイド3D 2";
  246. string text3 = string.Concat(new string[]
  247. {
  248. text,
  249. "\nVersion ",
  250. GameUty.GetGameVersionText(),
  251. " (BuildVersion : ",
  252. GameUty.GetBuildVersionText(),
  253. ")"
  254. });
  255. if (!string.IsNullOrEmpty(GameMain.Instance.CMSystem.CM3D2Path))
  256. {
  257. string text4 = text3;
  258. text3 = string.Concat(new string[]
  259. {
  260. text4,
  261. "\n",
  262. text2,
  263. "\nVersion ",
  264. GameUty.GetLegacyGameVersionText()
  265. });
  266. }
  267. GameMain.Instance.SysDlg.Show(text3, SystemDialog.TYPE.OK, new SystemDialog.OnClick(this.OnCancel), null);
  268. this.BaseClose();
  269. }
  270. private void OnClick_Ss()
  271. {
  272. GameMain.Instance.MainCamera.ScreenShot(true);
  273. }
  274. private void OnClick_SsUi()
  275. {
  276. this.VisibleExplanation(string.Empty, false);
  277. GameMain.Instance.MainCamera.ScreenShot(false);
  278. }
  279. private void OnClick_ToTitle()
  280. {
  281. if (!this.m_bEnablePanel)
  282. {
  283. return;
  284. }
  285. if (Application.loadedLevelName != "SceneTitle")
  286. {
  287. GameMain.Instance.SysDlg.ShowFromLanguageTerm("Dialog/タイトルに戻りますか?", null, SystemDialog.TYPE.OK_CANCEL, new SystemDialog.OnClick(this.OnToTitle), new SystemDialog.OnClick(this.OnCancel));
  288. }
  289. else
  290. {
  291. GameMain.Instance.SysDlg.ShowFromLanguageTerm("Dialog/現在タイトルに戻れません。", null, SystemDialog.TYPE.OK, new SystemDialog.OnClick(this.OnCancel), null);
  292. }
  293. this.BaseClose();
  294. }
  295. private void OnClick_Shop()
  296. {
  297. if (Product.lockDLCSiteLink)
  298. {
  299. Application.OpenURL("http://com3d2.world/?shop");
  300. }
  301. else
  302. {
  303. Application.OpenURL(GameMain.Instance.CMSystem.ShopURL);
  304. }
  305. }
  306. private void OnClick_VRCommHome()
  307. {
  308. GameMain.Instance.SysDlg.Show("エンパイアクラブに帰りますか?", SystemDialog.TYPE.OK_CANCEL, new SystemDialog.OnClick(this.OnToHome), new SystemDialog.OnClick(this.OnCancel));
  309. this.BaseClose();
  310. }
  311. private void OnToHome()
  312. {
  313. }
  314. private void OnClick_VRHelp()
  315. {
  316. }
  317. private void OnClick_Help()
  318. {
  319. if (!this.m_bEnablePanel)
  320. {
  321. return;
  322. }
  323. if (uGUITutorialPanel.IsOpened())
  324. {
  325. return;
  326. }
  327. string text = this.strSceneHelpName;
  328. if (string.IsNullOrEmpty(text))
  329. {
  330. text = GameMain.Instance.GetNowSceneName();
  331. if (string.IsNullOrEmpty(text))
  332. {
  333. text = SceneManager.GetActiveScene().name;
  334. }
  335. }
  336. if (uGUITutorialPanel.IsExistTutorial(text))
  337. {
  338. uGUITutorialPanel.OpenTutorial(text, null, true);
  339. }
  340. else
  341. {
  342. NDebug.Warning(string.Format("シーン名「{0}」のチュートリアルは存在しません", text));
  343. }
  344. this.BaseClose();
  345. }
  346. private void OnClick_VRAvatar()
  347. {
  348. ControllerShortcutWindow controllerShortcutWindow = OvrIK.CreateUI();
  349. controllerShortcutWindow.Open();
  350. this.BaseClose();
  351. }
  352. private void OnClick_VRConfig()
  353. {
  354. if (!this.m_bEnablePanel)
  355. {
  356. return;
  357. }
  358. if (ConfigVRCtrl.IsOpen())
  359. {
  360. return;
  361. }
  362. ConfigVRCtrl.Open(null);
  363. if (BaseMgr<ConfigMgr>.Instance.IsOpenConfigPanel())
  364. {
  365. BaseMgr<ConfigMgr>.Instance.CloseConfigPanel();
  366. }
  367. this.BaseClose();
  368. }
  369. private void OnClickDictionary()
  370. {
  371. if (!uGUITutorialPanel.IsOpened())
  372. {
  373. uGUITutorialPanel.OpenTutorial("WordDictionary", null, true);
  374. }
  375. }
  376. private void OnToEnd()
  377. {
  378. GameMain.Instance.ToApplicationQuit(true);
  379. }
  380. private void OnToTitle()
  381. {
  382. GameMain.Instance.SysDlg.Close();
  383. GameMain.Instance.LoadScene("SceneToTitle");
  384. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  385. }
  386. private void OnCancel()
  387. {
  388. GameMain.Instance.SysDlg.Close();
  389. }
  390. private void Start()
  391. {
  392. this.m_sys = GameMain.Instance.CMSystem;
  393. this.m_bEnablePanel = (this.m_bAlways = this.m_sys.SysButtonShowAlways);
  394. if (this.m_bAlways)
  395. {
  396. this.m_uiPanel.alpha = 1f;
  397. }
  398. else
  399. {
  400. this.m_uiPanel.alpha = 0f;
  401. }
  402. this.SetVRAvatarButtonInteractable();
  403. Vector2 vector = new Vector2(700f, (float)((!this.m_goBtn[10].activeSelf) ? 20 : 110));
  404. this.m_hitArea.size = new Vector3((float)this.m_uiBase.width + vector.x, (float)this.m_uiBase.height + vector.y, 0f);
  405. Vector3 center = this.m_uiBase.GetComponent<BoxCollider>().center;
  406. center.x = -190f + vector.x / 2f;
  407. center.y = (float)((!this.m_goBtn[10].activeSelf) ? -5 : -50);
  408. this.m_hitArea.center = center;
  409. }
  410. private void Update()
  411. {
  412. if (this.m_sys.SysButtonShowAlways != this.m_bAlways)
  413. {
  414. if (this.m_sys.SysButtonShowAlways)
  415. {
  416. this.m_uiPanel.alpha = 1f;
  417. this.PanelOpen();
  418. }
  419. else
  420. {
  421. this.PanelClose();
  422. }
  423. this.m_bAlways = this.m_sys.SysButtonShowAlways;
  424. }
  425. if (!this.m_bAlways)
  426. {
  427. if (!GameMain.Instance.VRMode)
  428. {
  429. Ray ray = this.m_uiCam.ScreenPointToRay(Input.mousePosition);
  430. RaycastHit raycastHit = default(RaycastHit);
  431. if (this.m_hitArea.Raycast(ray, out raycastHit, 3.40282347E+38f))
  432. {
  433. if (!this.m_bEnablePanel)
  434. {
  435. this.PanelOpen();
  436. }
  437. }
  438. else if (this.m_bEnablePanel)
  439. {
  440. this.PanelClose();
  441. }
  442. }
  443. else
  444. {
  445. Vector3 ovrVirtualMousePos = GameMain.Instance.OvrMgr.SystemUICamera.GetOvrVirtualMousePos(true);
  446. Vector3 ovrVirtualMousePos2 = GameMain.Instance.OvrMgr.SystemUICamera.GetOvrVirtualMousePos(false);
  447. Ray ray2 = this.m_uiCam.ScreenPointToRay(ovrVirtualMousePos);
  448. Ray ray3 = this.m_uiCam.ScreenPointToRay(ovrVirtualMousePos2);
  449. RaycastHit raycastHit2 = default(RaycastHit);
  450. if (this.m_hitArea.Raycast(ray2, out raycastHit2, 3.40282347E+38f) || this.m_hitArea.Raycast(ray3, out raycastHit2, 3.40282347E+38f))
  451. {
  452. if (!this.m_bEnablePanel)
  453. {
  454. this.PanelOpen();
  455. }
  456. }
  457. else if (this.m_bEnablePanel)
  458. {
  459. this.PanelClose();
  460. }
  461. }
  462. }
  463. }
  464. public void VisibleExplanation(string text, bool visible)
  465. {
  466. if (visible)
  467. {
  468. this.m_labelExplanation.text = LocalizationManager.GetTranslation(text, true, 0, true, false, null, null);
  469. this.m_labelExplanation.width = 0;
  470. this.m_labelExplanation.MakePixelPerfect();
  471. UISprite component = this.m_spriteExplanation.GetComponent<UISprite>();
  472. component.width = this.m_labelExplanation.width + 15;
  473. }
  474. this.m_spriteExplanation.gameObject.SetActive(visible);
  475. }
  476. private void OnActiveSceneChanged(Scene beforeScene, Scene activeScene)
  477. {
  478. this.SetHelpButtonInteractable();
  479. uGUITutorialPanel.CloseTutorial(true, false);
  480. this.SetVRAvatarButtonInteractable();
  481. Vector2 vector = new Vector2(700f, (float)((!this.m_goBtn[10].activeSelf) ? 20 : 110));
  482. this.m_hitArea.size = new Vector3((float)this.m_uiBase.width + vector.x, (float)this.m_uiBase.height + vector.y, 0f);
  483. Vector3 center = this.m_uiBase.GetComponent<BoxCollider>().center;
  484. center.x = -190f + vector.x / 2f;
  485. center.y = (float)((!this.m_goBtn[10].activeSelf) ? -5 : -50);
  486. this.m_hitArea.center = center;
  487. }
  488. private void OnSceneUnloaded(Scene unloadedScene)
  489. {
  490. this.strSceneHelpName = string.Empty;
  491. }
  492. public string strSceneHelpName
  493. {
  494. get
  495. {
  496. return this.m_strSceneHelpName;
  497. }
  498. set
  499. {
  500. if (string.IsNullOrEmpty(value))
  501. {
  502. this.m_strSceneHelpName = string.Empty;
  503. this.SetHelpButtonInteractable();
  504. return;
  505. }
  506. if (!uGUITutorialPanel.IsExistTutorial(value))
  507. {
  508. this.m_strSceneHelpName = string.Empty;
  509. this.SetHelpButtonInteractable();
  510. NDebug.Warning(string.Format("チュートリアル「{0}」は存在しないので、\nシーン名を利用します。", value));
  511. return;
  512. }
  513. this.m_strSceneHelpName = value;
  514. this.SetHelpButtonInteractable();
  515. }
  516. }
  517. private void SetHelpButtonInteractable()
  518. {
  519. GameObject childObject = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[9], false);
  520. NDebug.Assert(childObject != null, "ヘルプ用ボタンの取得に失敗しました。");
  521. UIButton component = childObject.GetComponent<UIButton>();
  522. string text = this.strSceneHelpName;
  523. if (string.IsNullOrEmpty(text))
  524. {
  525. text = GameMain.Instance.GetNowSceneName();
  526. if (string.IsNullOrEmpty(text))
  527. {
  528. text = SceneManager.GetActiveScene().name;
  529. }
  530. }
  531. if (uGUITutorialPanel.IsExistTutorial(text))
  532. {
  533. component.isEnabled = true;
  534. }
  535. else
  536. {
  537. component.isEnabled = false;
  538. }
  539. }
  540. public bool helpButtonInteractable
  541. {
  542. get
  543. {
  544. GameObject childObject = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[9], false);
  545. NDebug.Assert(childObject != null, "ヘルプ用ボタンの取得に失敗しました。");
  546. UIButton component = childObject.GetComponent<UIButton>();
  547. return component.isEnabled;
  548. }
  549. set
  550. {
  551. GameObject childObject = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[9], false);
  552. NDebug.Assert(childObject != null, "ヘルプ用ボタンの取得に失敗しました。");
  553. UIButton component = childObject.GetComponent<UIButton>();
  554. component.isEnabled = value;
  555. }
  556. }
  557. private void SetVRAvatarButtonInteractable()
  558. {
  559. GameObject childObject = UTY.GetChildObject(base.gameObject, this.m_aryObjPath[10], false);
  560. NDebug.Assert(childObject != null, "VRアバターボタンの取得に失敗しました。");
  561. if (GameMain.Instance == null)
  562. {
  563. return;
  564. }
  565. GameMain.VRDeviceType vrdeviceTypeID = GameMain.Instance.VRDeviceTypeID;
  566. if (vrdeviceTypeID != GameMain.VRDeviceType.VIVE && vrdeviceTypeID != GameMain.VRDeviceType.RIFT_TOUCH)
  567. {
  568. childObject.SetActive(false);
  569. return;
  570. }
  571. string nowSceneName = GameMain.Instance.GetNowSceneName();
  572. if (string.IsNullOrEmpty(nowSceneName) || GameMain.Instance.CMSystem.SConfig.OvrIkAllSceneEnable || nowSceneName == "SceneEdit" || nowSceneName == "ScenePhotoMode" || nowSceneName.IndexOf("SceneDance_") == 0)
  573. {
  574. childObject.SetActive(true);
  575. }
  576. else
  577. {
  578. childObject.SetActive(false);
  579. }
  580. }
  581. private string[] m_aryObjPath = new string[]
  582. {
  583. "Base/Grid/Config",
  584. "Base/Grid/Exit",
  585. "Base/Grid/Info",
  586. "Base/Grid/Ss",
  587. "Base/Grid/SsUi",
  588. "Base/Grid/ToTitle",
  589. "Base/Grid/Shop",
  590. "BaseVR/Grid/VRCommHome",
  591. "BaseVR/Grid/VRHelp",
  592. "Base/Grid/Help",
  593. "Base/VR Avatar",
  594. "Base/Grid/Dic"
  595. };
  596. private UIPanel m_uiPanel;
  597. private BoxCollider m_hitArea;
  598. private GameObject m_goBase;
  599. private UISprite m_uiBase;
  600. private GameObject m_goBaseVR;
  601. private UISprite m_uiBaseVR;
  602. private GameObject m_goGear;
  603. private UIButton m_uiGear;
  604. private GameObject[] m_goBtn = new GameObject[12];
  605. private UIButton[] m_uiBtn = new UIButton[12];
  606. private Camera m_uiCam;
  607. private UISprite m_spriteExplanation;
  608. private UILabel m_labelExplanation;
  609. private bool m_bEnablePanel;
  610. private bool m_bEnableBase;
  611. private Dictionary<SystemShortcut.BGSizeType, int> dicBGSizeType = new Dictionary<SystemShortcut.BGSizeType, int>();
  612. private EventDelegate[] m_aryDgOnClick = new EventDelegate[12];
  613. private bool m_bAlways = true;
  614. private CMSystem m_sys;
  615. private string m_strSceneHelpName = string.Empty;
  616. private enum Btn
  617. {
  618. Config,
  619. Exit,
  620. Info,
  621. Ss,
  622. SsUi,
  623. ToTitle,
  624. Shop,
  625. VRCommHome,
  626. VRHelp,
  627. Help,
  628. VRAvatar,
  629. Dic,
  630. Max
  631. }
  632. private enum BGSizeType
  633. {
  634. Long,
  635. Short
  636. }
  637. }