//============================================================ // <T>加载配置信息。</T> // // @param xconfig 配置信息 //============================================================ public override void LoadConfig(FXmlNode xconfig) { foreach (FXmlNode xnode in xconfig.Nodes) { if (xnode.IsName("Bitmap")) { // 查找图片对象 string typeName = null; if (xnode.Contains("type")) { typeName = xnode.Get("type"); } else { typeName = xnode.Get("type_name"); } int typeCd = EDrTexture.Parse(typeName); FDrTextureBitmap bitmap = FindByTypeCd(typeCd); if (null != bitmap) { // 加载设置 bitmap.LoadConfig(xnode); } else { RMoCore.TrackConsole.Write(this, "LoadConfig", "Texture bitmap is not exists in config. (type_name={0}, file_name={1})", typeName, _configFileName); } } } }
//============================================================ // <T>加载设置信息。</T> // // @param xconfig 配置信息 //============================================================ public void LoadConfig(FXmlNode xconfig) { string typeName = null; // 读取类型 if (xconfig.Contains("type")) { typeName = xconfig.Get("type"); } else { typeName = xconfig.Get("type_name"); } _typeCd = EDrTexture.Parse(typeName); // 读取属性 _tick = xconfig.GetInteger("tick", _tick); }