Exemplo n.º 1
0
    public static T GetTable <T>() where T : CSVReader, new()
    {
        uint uid = XCommon.singleton.XHash(typeof(T).Name);

        if (readers == null || !readers.ContainsKey(uid))
        {
            //此情况下主要是编辑器模式会用到 一开始并没有读取所有的表格
            XConfig.InitPath();
            Add <T>();
            readers[uid].Create();
        }
        return(readers[uid] as T);
    }