private static t_mapBeanHF GetConfigImp(int key) { t_mapBeanHF bean = null; GameDll.Tool.StringBuilder.Append("select * from t_mapBean where t_id = "); GameDll.Tool.StringBuilder.Append(key); if (GameDll.DataManager.BeginRead(GameDll.Tool.StringBuilder.ToString())) { bean = new t_mapBeanHF(); bean.t_id = GameDll.DataManager.ReadInt(); bean.t_name = GameDll.DataManager.ReadString(); bean.t_map_pathdata = GameDll.DataManager.ReadString(); bean.t_map_data_abname = GameDll.DataManager.ReadString(); bean.t_map_info = GameDll.DataManager.ReadString(); bean.t_map_assetname = GameDll.DataManager.ReadString(); bean.t_map_abname = GameDll.DataManager.ReadString(); bean.t_jubian = GameDll.DataManager.ReadString(); bean.t_brush_id = GameDll.DataManager.ReadString(); } GameDll.DataManager.EndRead(); GameDll.Tool.StringBuilder.Clear(); if (bean == null) { UnityEngine.Debug.LogError("没有找到配置表,配置表是:t_mapBeanHF Id:" + key); return(null); } return(bean); }
public void EnterLoginScene() { UnityEngine.Debug.Log("cshotfix EnterLogin start"); t_mapBeanHF map = t_mapBeanHF.GetConfig(2); //map = null; m_AssetBundleName = map.t_map_abname.ToLower(); string assetName = map.t_map_assetname; m_AssetBundleName = "scene/login/login_scene.jpg"; assetName = "login_scene"; m_ABId = ResourceManager.LoadLevel(m_AssetBundleName, assetName, 0, LoadedScene); UnityEngine.Debug.Log("cshotfix EnterLogin end"); }
public static t_mapBeanHF GetConfig(int key) { t_mapBeanHF bean = null; if (m_Dic.TryGetValue(key, out bean)) { return(bean); } else { bean = GetConfigImp(key); m_Dic.Add(key, bean); return(bean); } }