import { Prefab, Skeleton, sp, SpriteFrame, TextAsset, Texture2D } from "cc";
/*loadAtLaunch: true//是否加载配置的bundle
preloadAssets: [
    { path: 'prefabs/main_menu' },
    { path: 'prefabs/loading' },
    { path: 'textures/background', skipLoading: true }这个资源跳过加载
],
autoLoadAll: true //自动加载所有资源
excludePaths?: [],//要排除的资源路径前缀（当autoLoadAll为true时生效
excludeExtensions?: []//要排除的文件扩展名（如['.meta']*/

//游戏初始化资源加载配置
/*export const bundleConfig: any = new Map([
    ['audios', {
        loadAtLaunch: true,
        autoLoadAll: true //自动加载所有资源
    }],
    ['csb', {
        loadAtLaunch: true,
        preloadAssets: [
            { path: 'csv/deblock' },
            { path: 'csv/levels' },
            { path: 'csv/norm', skipLoading: true } // 这个资源跳过加载
        ]
    }],
    ['prefabs', {
        loadAtLaunch: true, // 不参与启动加载
        preloadAssets: [
            { path: 'enemies/enemie_01', type: Prefab },
            { path: 'enemies/enemie_02', type: Prefab },
            { path: 'texture/msg_hint/spriteFrame', type: SpriteFrame },
            { path: 'texture/test_01/texture', type: Texture2D },
            { path: 'texture/test_02/spriteFrame', type: SpriteFrame }
        ]
    }]
]);*/

export const bundleConfig: any = new Map([
    ['audios', {
        loadAtLaunch: true,
        autoLoadAll: true //自动加载所有资源
    }],
    ['models', {
        loadAtLaunch: true,
        autoLoadAll: true //自动加载所有资源
    }],
    ['resources', {
        loadAtLaunch: true, // 不参与启动加载
        preloadAssets: [
            { path: 'csv/levels', type: TextAsset },
            { path: 'csv/model_names', type: TextAsset },
            { path: 'prefabs/BusyLoading', type: Prefab },
            { path: 'prefabs/Coin', type: Prefab },
            { path: 'prefabs/Life', type: Prefab },
            { path: 'prefabs/MsgHints', type: Prefab },
            { path: 'prefabs/Star', type: Prefab },
            { path: 'spine/effect_hecheng', type:  sp.SkeletonData}
        ]
    }]
]);