/// <summary> /// 从语言本地化配置读取数据并设置语言本地化的数据映射 /// </summary> /// <param name="locals">语言本地化标记,用于区分不同地区的本地化配置</param> /// <param name="localsConfigName">保存了语言本地化配置的配置名,用于从配置消息对象中读取本地化配置数据</param> /// <param name="param">消息对象,持有语言本地化的配置数据</param> /// <param name="raw">用于保存语言本地化映射数据的对象</param> protected void SetDataFromLocalsConfig <T>(ref string locals, ref string localsConfigName, ref IConfigNotice param, ref Dictionary <int, string> raw) where T : IConfig, new() { Dictionary <int, T> configs = param.GetConfigRaw <T>(localsConfigName); int id; T item; KeyValuePair <int, T> pair; Dictionary <int, T> .Enumerator localsEnumer = configs.GetEnumerator(); int max = configs.Count; for (int i = 0; i < max; i++) { localsEnumer.MoveNext(); pair = localsEnumer.Current; item = pair.Value; id = item.GetID();//配置的键名 raw[id] = GetLocalsDescription(ref locals, ref item); } }
/// <summary> /// 响应获取语言本地化配置事件的处理函数 /// </summary> /// <param name="raw">用于保存语言本地化映射数据的对象</param> /// <param name="param">消息对象,持有语言本地化的配置数据</param> public virtual void GetLocalsConfigItemHandler(Dictionary <int, string> raw, IConfigNotice param) { }
private void LoadConfig(ref IConfigNotice target) { }
/// <summary> /// 响应初始化游戏用户数据事件的处理函数,用于向用户数据填充源自配置文件部分的内容 /// </summary> /// <param name="param">消息对象,持有待处理的各个数据代理对象</param> public virtual void InitProfileDataHandler(IConfigNotice param) { }
private void GetConfigNotice(ref IConfigNotice target) { }