/// <summary>
        /// 创建加载字典成功事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载字典成功事件。</returns>
        public static LoadDictionarySuccessEventArgs Create(ReadDataSuccessEventArgs e)
        {
            LoadDictionarySuccessEventArgs loadDictionarySuccessEventArgs = ReferencePool.Acquire <LoadDictionarySuccessEventArgs>();

            loadDictionarySuccessEventArgs.DictionaryAssetName = e.DataAssetName;
            loadDictionarySuccessEventArgs.Duration            = e.Duration;
            loadDictionarySuccessEventArgs.UserData            = e.UserData;
            return(loadDictionarySuccessEventArgs);
        }
示例#2
0
        /// <summary>
        /// 创建加载字典成功事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载字典成功事件。</returns>
        public static LoadDictionarySuccessEventArgs Create(GameFramework.Localization.LoadDictionarySuccessEventArgs e)
        {
            LoadDictionaryInfo             loadDictionaryInfo             = (LoadDictionaryInfo)e.UserData;
            LoadDictionarySuccessEventArgs loadDictionarySuccessEventArgs = ReferencePool.Acquire <LoadDictionarySuccessEventArgs>();

            loadDictionarySuccessEventArgs.DictionaryName      = loadDictionaryInfo.DictionaryName;
            loadDictionarySuccessEventArgs.DictionaryAssetName = e.DictionaryAssetName;
            loadDictionarySuccessEventArgs.Duration            = e.Duration;
            loadDictionarySuccessEventArgs.UserData            = loadDictionaryInfo.UserData;
            ReferencePool.Release(loadDictionaryInfo);
            return(loadDictionarySuccessEventArgs);
        }
 private void OnLoadDictionarySuccess(object sender, GameFramework.Localization.LoadDictionarySuccessEventArgs e)
 {
     m_EventComponent.Fire(this, LoadDictionarySuccessEventArgs.Create(e));
 }
 private void OnReadDataSuccess(object sender, ReadDataSuccessEventArgs e)
 {
     m_EventComponent.Fire(this, LoadDictionarySuccessEventArgs.Create(e));
 }