private void OnLoadDictionaryDependencyAsset(object sender, GameFramework.Localization.LoadDictionaryDependencyAssetEventArgs e) { if (m_EnableLoadDictionaryDependencyAssetEvent) { m_EventComponent.Fire(this, ReferencePool.Acquire <LoadDictionaryDependencyAssetEventArgs>().Fill(e)); } }
/// <summary> /// 初始化加载字典时加载依赖资源事件的新实例。 /// </summary> /// <param name="e">内部事件。</param> public LoadDictionaryDependencyAssetEventArgs(GameFramework.Localization.LoadDictionaryDependencyAssetEventArgs e) { LoadDictionaryInfo loadDictionaryInfo = e.UserData as LoadDictionaryInfo; DictionaryName = loadDictionaryInfo.DictionaryName; DictionaryAssetName = e.DictionaryAssetName; DependencyAssetName = e.DependencyAssetName; LoadedCount = e.LoadedCount; TotalCount = e.TotalCount; UserData = loadDictionaryInfo.UserData; }
/// <summary> /// 填充加载字典时加载依赖资源事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>加载字典时加载依赖资源事件。</returns> public LoadDictionaryDependencyAssetEventArgs Fill(GameFramework.Localization.LoadDictionaryDependencyAssetEventArgs e) { LoadDictionaryInfo loadDictionaryInfo = (LoadDictionaryInfo)e.UserData; DictionaryName = loadDictionaryInfo.DictionaryName; DictionaryAssetName = e.DictionaryAssetName; DependencyAssetName = e.DependencyAssetName; LoadedCount = e.LoadedCount; TotalCount = e.TotalCount; UserData = loadDictionaryInfo.UserData; return(this); }
/// <summary> /// 创建加载字典时加载依赖资源事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>创建的加载字典时加载依赖资源事件。</returns> public static LoadDictionaryDependencyAssetEventArgs Create(GameFramework.Localization.LoadDictionaryDependencyAssetEventArgs e) { LoadDictionaryInfo loadDictionaryInfo = (LoadDictionaryInfo)e.UserData; LoadDictionaryDependencyAssetEventArgs loadDictionaryDependencyAssetEventArgs = ReferencePool.Acquire <LoadDictionaryDependencyAssetEventArgs>(); loadDictionaryDependencyAssetEventArgs.DictionaryName = loadDictionaryInfo.DictionaryName; loadDictionaryDependencyAssetEventArgs.DictionaryAssetName = e.DictionaryAssetName; loadDictionaryDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName; loadDictionaryDependencyAssetEventArgs.LoadedCount = e.LoadedCount; loadDictionaryDependencyAssetEventArgs.TotalCount = e.TotalCount; loadDictionaryDependencyAssetEventArgs.UserData = loadDictionaryInfo.UserData; return(loadDictionaryDependencyAssetEventArgs); }