Пример #1
0
        /// <summary>
        /// 填充加载数据表时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>加载数据表时加载依赖资源事件。</returns>
        public LoadDataTableDependencyAssetEventArgs Fill(GameFramework.DataTable.LoadDataTableDependencyAssetEventArgs e)
        {
            LoadDataTableInfo loadDataTableInfo = (LoadDataTableInfo)e.UserData;

            DataRowType         = loadDataTableInfo.DataRowType;
            DataTableName       = loadDataTableInfo.DataTableName;
            DataTableAssetName  = e.DataTableAssetName;
            DependencyAssetName = e.DependencyAssetName;
            LoadedCount         = e.LoadedCount;
            TotalCount          = e.TotalCount;
            UserData            = loadDataTableInfo.UserData;

            return(this);
        }
        /// <summary>
        /// 加载数据表。
        /// </summary>
        /// <param name="dataTableAsset">数据表资源。</param>
        /// <param name="userData">用户自定义数据。</param>
        /// <returns>加载是否成功。</returns>
        public bool LoadDataTable(object dataTableAsset, object userData)
        {
            LoadDataTableInfo loadDataTableInfo = (LoadDataTableInfo)userData;

            return(LoadDataTable(loadDataTableInfo.DataRowType, loadDataTableInfo.DataTableName, loadDataTableInfo.DataTableNameInType, dataTableAsset, loadDataTableInfo.UserData));
        }