private void OnLoadDataTableUpdate(object sender, GameFramework.DataTable.LoadDataTableUpdateEventArgs e) { if (m_EnableLoadDataTableUpdateEvent) { m_EventComponent.Fire(this, ReferencePool.Acquire <LoadDataTableUpdateEventArgs>().Fill(e)); } }
/// <summary> /// 初始化加载数据表更新事件的新实例。 /// </summary> /// <param name="e">内部事件。</param> public LoadDataTableUpdateEventArgs(GameFramework.DataTable.LoadDataTableUpdateEventArgs e) { LoadDataTableInfo loadDataTableInfo = (LoadDataTableInfo)e.UserData; DataTableName = loadDataTableInfo.DataTableName; DataTableType = loadDataTableInfo.DataTableType; DataTableAssetName = e.DataTableAssetName; Progress = e.Progress; UserData = loadDataTableInfo.UserData; }
/// <summary> /// 填充加载数据表更新事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>加载数据表更新事件。</returns> public LoadDataTableUpdateEventArgs Fill(GameFramework.DataTable.LoadDataTableUpdateEventArgs e) { LoadDataTableInfo loadDataTableInfo = (LoadDataTableInfo)e.UserData; DataRowType = loadDataTableInfo.DataRowType; DataTableName = loadDataTableInfo.DataTableName; DataTableAssetName = e.DataTableAssetName; Progress = e.Progress; UserData = loadDataTableInfo.UserData; return(this); }
/// <summary> /// 创建加载数据表更新事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>创建的加载数据表更新事件。</returns> public static LoadDataTableUpdateEventArgs Create(GameFramework.DataTable.LoadDataTableUpdateEventArgs e) { LoadDataTableInfo loadDataTableInfo = (LoadDataTableInfo)e.UserData; LoadDataTableUpdateEventArgs loadDataTableUpdateEventArgs = ReferencePool.Acquire <LoadDataTableUpdateEventArgs>(); loadDataTableUpdateEventArgs.DataRowType = loadDataTableInfo.DataRowType; loadDataTableUpdateEventArgs.DataTableName = loadDataTableInfo.DataTableName; loadDataTableUpdateEventArgs.DataTableAssetName = e.DataTableAssetName; loadDataTableUpdateEventArgs.Progress = e.Progress; loadDataTableUpdateEventArgs.UserData = loadDataTableInfo.UserData; return(loadDataTableUpdateEventArgs); }