Пример #1
0
        /// <summary>
        /// 创建加载全局配置时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载全局配置时加载依赖资源事件。</returns>
        public static LoadConfigDependencyAssetEventArgs Create(ReadDataDependencyAssetEventArgs e)
        {
            LoadConfigDependencyAssetEventArgs loadConfigDependencyAssetEventArgs = ReferencePool.Acquire <LoadConfigDependencyAssetEventArgs>();

            loadConfigDependencyAssetEventArgs.ConfigAssetName     = e.DataAssetName;
            loadConfigDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName;
            loadConfigDependencyAssetEventArgs.LoadedCount         = e.LoadedCount;
            loadConfigDependencyAssetEventArgs.TotalCount          = e.TotalCount;
            loadConfigDependencyAssetEventArgs.UserData            = e.UserData;
            return(loadConfigDependencyAssetEventArgs);
        }
Пример #2
0
        /// <summary>
        /// 创建加载配置时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载配置时加载依赖资源事件。</returns>
        public static LoadConfigDependencyAssetEventArgs Create(GameFramework.Config.LoadConfigDependencyAssetEventArgs e)
        {
            LoadConfigInfo loadConfigInfo = (LoadConfigInfo)e.UserData;
            LoadConfigDependencyAssetEventArgs loadConfigDependencyAssetEventArgs = ReferencePool.Acquire <LoadConfigDependencyAssetEventArgs>();

            loadConfigDependencyAssetEventArgs.ConfigName          = loadConfigInfo.ConfigName;
            loadConfigDependencyAssetEventArgs.ConfigAssetName     = e.ConfigAssetName;
            loadConfigDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName;
            loadConfigDependencyAssetEventArgs.LoadedCount         = e.LoadedCount;
            loadConfigDependencyAssetEventArgs.TotalCount          = e.TotalCount;
            loadConfigDependencyAssetEventArgs.UserData            = loadConfigInfo.UserData;
            return(loadConfigDependencyAssetEventArgs);
        }
Пример #3
0
 private void OnLoadConfigDependencyAsset(object sender, GameFramework.Config.LoadConfigDependencyAssetEventArgs e)
 {
     m_EventComponent.Fire(this, LoadConfigDependencyAssetEventArgs.Create(e));
 }
Пример #4
0
 private void OnReadDataDependencyAsset(object sender, ReadDataDependencyAssetEventArgs e)
 {
     m_EventComponent.Fire(this, LoadConfigDependencyAssetEventArgs.Create(e));
 }