UIGameMenuForm.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace MetaClient
  6. {
  7. public class UIGameMenuForm : UGuiForm
  8. {
  9. // Start is called before the first frame update
  10. [Header("金币数量")]
  11. public Text coinMoneyText;
  12. [Header("砖石数量")]
  13. public Text diamondMoneyText;
  14. [Header("人物icon")]
  15. public Image roleIcon;
  16. protected override void OnOpen(object userData)
  17. {
  18. base.OnOpen(userData);
  19. Refesh();
  20. }
  21. protected override void OnClose(bool isShutdown, object userData)
  22. {
  23. base.OnClose(isShutdown, userData);
  24. }
  25. /// <summary>
  26. /// 金币数量,钻石数量,人物icon刷新
  27. /// </summary>
  28. public void Refesh()
  29. {
  30. //roleIcon.sprite=
  31. coinMoneyText.text = 1000 + "";
  32. diamondMoneyText.text = 10 + "";
  33. }
  34. public void AddCoinMoneyFun() {
  35. }
  36. public void AddDiamondMoneyfun()
  37. {
  38. }
  39. public void RoleIconChangeFun()
  40. {
  41. }
  42. ///// <summary>
  43. ///// 切换界面
  44. ///// </summary>
  45. //public void OpenViewUIFormId(UIFormId uIFormId) {
  46. // GameEntry.UI.OpenUIForm(uIFormId);
  47. //}
  48. /// <summary>
  49. /// 打开元宇宙界面
  50. /// </summary>
  51. public void OpenYUniverseView()
  52. {
  53. //GameEntry.UI.OpenUIForm();
  54. }
  55. /// <summary>
  56. /// 打开创作界面
  57. /// </summary>
  58. public void OpenCreateView()
  59. {
  60. //GameEntry.UI.OpenUIForm();
  61. }
  62. /// <summary>
  63. /// 打开创作界面
  64. /// </summary>
  65. public void OpenCameraView()
  66. {
  67. //GameEntry.UI.OpenUIForm();
  68. }
  69. /// <summary>
  70. /// 打开捏脸界面
  71. /// </summary>
  72. public void OpenBehaviorView()
  73. {
  74. Debug.Log("打开捏脸界面");
  75. Close();
  76. // GameEntry.UI.OpenUIForm(UIFormId.CustomRole);
  77. }
  78. public void OpenShopView()
  79. {
  80. GameEntry.UI.OpenUIForm(UIFormId.CustomRole);
  81. }
  82. }
  83. }