public override CRecordTable Load() { byte[] buff = (Resources.Load(mTablePath) as TextAsset).bytes; if (buff != null) { mRecordTable = new CRecordTable(); mRecordTable.Load <TItem, TList>(buff); } return(mRecordTable); }
public void LoadBinary(int nKey) { if (!mResTable.Contains(nKey)) { CTableRecordBase recordBase = mTablePathDic[nKey]; if (recordBase != null) { CRecordTable recordTable = recordBase.Load(); mResTable.Add(nKey, recordTable); } } }
public T GetRecordIndex <T>(int tableIndex, int dataIndex) where T : IExtensible { CRecordTable recordTable = (CRecordTable)mResTable[tableIndex]; if (recordTable == null) { recordTable = mTablePathDic[tableIndex].Load(); mResTable.Add(tableIndex, recordTable); } if (recordTable != null) { return((T)recordTable.GetItemWithIndex(dataIndex)); } return(default(T)); }
public CRecordTable GetTable(int tableIndex) { if (mResTable[tableIndex] == null) { CRecordTable recordTable = mTablePathDic[tableIndex].Load(); if (recordTable == null) { Debug.LogError("TableResMgr.GetTable is Error,index: " + tableIndex); return(null); } mResTable.Add(tableIndex, recordTable); return(recordTable); } return((CRecordTable)mResTable[tableIndex]); }