/// <summary> /// 获取此表中某条数据 /// </summary> public T GetRecord <T>(uint id) where T : ITableLoad, new() { ConfigTableBase <T> table = GetTableData <T>(); if (table == null) { return(default(T)); } return(table.GetData(id)); }
/// <summary> /// 获取表格中数据条数 /// </summary> public int GetTableCount <T>() where T : ITableLoad, new() { int res = 0; Type tableType = typeof(T); if (_Tables.Contains(tableType)) { ConfigTableBase <T> table = _Tables[tableType] as ConfigTableBase <T>; return(table.RecordCount); } else { Debug.LogError("查找表数据,未找到表: " + typeof(T)); } return(res); }
//-----------------公共方法------------------ #region 公共方法 public void SetUIConfig(ConfigTableBase <UIConfigTable> uiConfig) { _UIConfig = uiConfig; }