12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using Studio.Scripts;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using XRTool.Util;
- using XRTool.WorldUI;
- namespace ShadowStudio.UI
- {
- [RequireComponent(typeof(WorldDlg))]
- public class MenuListDlg : UnitySingleton<MenuListDlg>
- {
- /// <summary>
- /// 房间父物体的RoomList脚本
- /// </summary>
- public MenuUI _menuUI
- {
- get;
- set;
- }
- void Start()
- {
- WorldDlg dlg = GetComponent<WorldDlg>();
- _menuUI = dlg.GetBreadthChild<MenuUI>("MenuUI");
- //TODO 感觉这个位置不是太合理
- HomeProxy.Instance.GetModelList();
- }
- /// <summary>
- /// 显示房间游戏对象的方法
- /// </summary>
- public void Show()
- {
- if (_menuUI != null)
- _menuUI.ShowItemEffect();
- }
- /// <summary>
- /// 隐藏房间游戏对象的方法
- /// </summary>
- public void Hide()
- {
- if (_menuUI != null)
- _menuUI.HideItemEffect();
- }
- /// <summary>
- /// 刷新按钮显示状态
- /// </summary>
- public void UpdateBtn()
- {
- if (_menuUI != null)
- {
- _menuUI.RefreshDteBtn();
- }
- }
- /// <summary>
- /// 加载数据
- /// </summary>
- public void LoadData()
- {
- if (_menuUI != null)
- {
- _menuUI.LoadData();
- }
- }
- /// <summary>
- /// 刷新数据显示
- /// </summary>
- public void UpdateData()
- {
- if (_menuUI != null)
- {
- _menuUI.UpdateData();
- }
- }
- private void OnEnable()
- {
- Show();
- }
- }
- }
|