1234567891011121314151617181920212223242526272829303132 |
- using PublicTools.XMLDataBase;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using XRTool.Util;
- namespace XRTool.UI
- {
- /// <summary>
- /// 数据访问单例
- /// </summary>
- /// <typeparam name="T"></typeparam>
- public class DataConfMgr<T> : Singleton<DataConfMgr<T>>
- {
- private TableHelper<T> tableHelper;
- public TableHelper<T> TableHelper { get => tableHelper; set => tableHelper = value; }
- public void OpenTable(string priKey = null)
- {
- TableHelper.Open(priKey);
- }
- /// <summary>
- /// 打开某路径下的资源
- /// </summary>
- /// <param name="path"></param>
- public void OpenData(string path)
- {
- if (TableHelper == null)
- {
- TableHelper = new TableHelper<T>(path);
- }
- }
- }
- }
|