Example #1
0
        /// <summary>
        /// 创建加载字典时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载字典时加载依赖资源事件。</returns>
        public static LoadDictionaryDependencyAssetEventArgs Create(ReadDataDependencyAssetEventArgs e)
        {
            LoadDictionaryDependencyAssetEventArgs loadDictionaryDependencyAssetEventArgs = ReferencePool.Acquire <LoadDictionaryDependencyAssetEventArgs>();

            loadDictionaryDependencyAssetEventArgs.DictionaryAssetName = e.DataAssetName;
            loadDictionaryDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName;
            loadDictionaryDependencyAssetEventArgs.LoadedCount         = e.LoadedCount;
            loadDictionaryDependencyAssetEventArgs.TotalCount          = e.TotalCount;
            loadDictionaryDependencyAssetEventArgs.UserData            = e.UserData;
            return(loadDictionaryDependencyAssetEventArgs);
        }
        /// <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);
        }
 private void OnLoadDictionaryDependencyAsset(object sender, GameFramework.Localization.LoadDictionaryDependencyAssetEventArgs e)
 {
     m_EventComponent.Fire(this, LoadDictionaryDependencyAssetEventArgs.Create(e));
 }
 private void OnReadDataDependencyAsset(object sender, ReadDataDependencyAssetEventArgs e)
 {
     m_EventComponent.Fire(this, LoadDictionaryDependencyAssetEventArgs.Create(e));
 }