SystemShortcut.cs 19 KB

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