Пример #1
0
        public MapDataProvider GetMapDataBySceneResId(int resId)
        {
            MapDataProvider data = null;

            m_MapDataProviders.TryGetValue(resId, out data);
            return(data);
        }
Пример #2
0
 public MapDataProvider LoadSceneConfig(int id, string rootPath)
 {
     if (m_MapDataProviders.ContainsKey(id))
     {
         return(m_MapDataProviders[id]);
     }
     else
     {
         MapDataProvider  provider = null;
         Data_SceneConfig sceneCfg = m_SceneConfigMgr.GetDataById(id);
         if (null != sceneCfg)
         {
             provider = new MapDataProvider();
             provider.CollectData(DataMap_Type.DT_Unit, rootPath + sceneCfg.m_UnitFile, "UnitInfo");
             provider.CollectData(DataMap_Type.DT_SceneLogic, rootPath + sceneCfg.m_SceneLogicFile, "SceneLogic");
             m_MapDataProviders.Add(id, provider);
         }
         return(provider);
     }
 }