Exemplo n.º 1
0
 public void Init()
 {
     if (_WeatherTimeConfig == null)
     {
         _WeatherTimeConfig = new WeatherTimeConifg();
         string path  = Path.Combine(EntryPoint.Instance.ConfigPath, "WeatherTimeConfigXml.xml");
         byte[] bytes = Util.ReadFile(path);
         if (bytes == null)
         {
             HobaDebuger.LogError("WeatherTimeConfigXml文件读取失败! " + path);
         }
         bool isReadSuccess = _WeatherTimeConfig.ParseFromXmlString(Encoding.UTF8.GetString(bytes));
         if (!isReadSuccess)
         {
             HobaDebuger.LogError("WeatherTimeConfigXml文件解析失败! " + path);
         }
     }
 }
Exemplo n.º 2
0
 public void Release()
 {
     _WeatherTimeConfig = null;
 }