/// <summary>
        /// 创建加载数据表时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载数据表时加载依赖资源事件。</returns>
        public static LoadDataTableDependencyAssetEventArgs Create(ReadDataDependencyAssetEventArgs e)
        {
            LoadDataTableDependencyAssetEventArgs loadDataTableDependencyAssetEventArgs = ReferencePool.Acquire <LoadDataTableDependencyAssetEventArgs>();

            loadDataTableDependencyAssetEventArgs.DataTableAssetName  = e.DataAssetName;
            loadDataTableDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName;
            loadDataTableDependencyAssetEventArgs.LoadedCount         = e.LoadedCount;
            loadDataTableDependencyAssetEventArgs.TotalCount          = e.TotalCount;
            loadDataTableDependencyAssetEventArgs.UserData            = e.UserData;
            return(loadDataTableDependencyAssetEventArgs);
        }
        /// <summary>
        /// 创建加载数据表时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载数据表时加载依赖资源事件。</returns>
        public static LoadDataTableDependencyAssetEventArgs Create(GameFramework.DataTable.LoadDataTableDependencyAssetEventArgs e)
        {
            LoadDataTableInfo loadDataTableInfo = (LoadDataTableInfo)e.UserData;
            LoadDataTableDependencyAssetEventArgs loadDataTableDependencyAssetEventArgs = ReferencePool.Acquire <LoadDataTableDependencyAssetEventArgs>();

            loadDataTableDependencyAssetEventArgs.DataRowType         = loadDataTableInfo.DataRowType;
            loadDataTableDependencyAssetEventArgs.DataTableName       = loadDataTableInfo.DataTableName;
            loadDataTableDependencyAssetEventArgs.DataTableAssetName  = e.DataTableAssetName;
            loadDataTableDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName;
            loadDataTableDependencyAssetEventArgs.LoadedCount         = e.LoadedCount;
            loadDataTableDependencyAssetEventArgs.TotalCount          = e.TotalCount;
            loadDataTableDependencyAssetEventArgs.UserData            = loadDataTableInfo.UserData;
            return(loadDataTableDependencyAssetEventArgs);
        }
Пример #3
0
 private void OnLoadDataTableDependencyAsset(object sender, GameFramework.DataTable.LoadDataTableDependencyAssetEventArgs e)
 {
     m_EventComponent.Fire(this, LoadDataTableDependencyAssetEventArgs.Create(e));
 }
 private void OnReadDataDependencyAsset(object sender, ReadDataDependencyAssetEventArgs e)
 {
     m_EventComponent.Raise(this, LoadDataTableDependencyAssetEventArgs.Create(e));
 }