11261ccc4b08ec4e0d7381b68a61ece8a9d52bd4.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. System.register(["cc"], function (_export, _context) {
  2. "use strict";
  3. var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, Prefab, SpriteFrame, Texture2D, _crd, bundleConfig;
  4. return {
  5. setters: [function (_cc) {
  6. _cclegacy = _cc.cclegacy;
  7. __checkObsolete__ = _cc.__checkObsolete__;
  8. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  9. Prefab = _cc.Prefab;
  10. SpriteFrame = _cc.SpriteFrame;
  11. Texture2D = _cc.Texture2D;
  12. }],
  13. execute: function () {
  14. _crd = true;
  15. _cclegacy._RF.push({}, "7c031pNnkVKr7dEuMs8VZ76", "BundleConfig", undefined);
  16. /*['data', {
  17. loadAtLaunch: true,//是否加载配置的bundle
  18. preloadAssets: [
  19. { path: 'textures/background', skipLoading: true }这个资源跳过加载
  20. { path: 'csv', isDirectory: true }, // 加载csv目录下所有文件
  21. { path: 'json/config', isDirectory: true }, // 加载config目录下所有文件
  22. { path: 'special/item', type: Prefab } // 单独加载某个特定资源
  23. ],
  24. autoLoadAll: true //自动加载所有资源
  25. excludePaths?: [],//要排除的资源路径前缀(当autoLoadAll为true时生效
  26. excludeExtensions?: []//要排除的文件扩展名(如['.meta']
  27. }],
  28. ['prefabs', {
  29. loadAtLaunch: true,
  30. preloadAssets: [
  31. { path: 'ui', isDirectory: true, type: Prefab }, // 加载ui目录下所有Prefab
  32. { path: 'effects', isDirectory: true } // 加载effects目录下所有资源
  33. { path: 'enemies/enemie_01', type: Prefab },
  34. { path: 'enemies/enemie_02', type: Prefab },
  35. { path: 'texture/msg_hint/spriteFrame', type: SpriteFrame },
  36. { path: 'texture/test_01/texture', type: Texture2D },
  37. { path: 'texture/test_02/spriteFrame', type: SpriteFrame }
  38. ]
  39. }]*/
  40. //游戏初始化资源加载配置
  41. __checkObsolete__(['Prefab', 'SpriteFrame', 'Texture2D']);
  42. _export("bundleConfig", bundleConfig = new Map([['audios', {
  43. loadAtLaunch: true,
  44. autoLoadAll: true //自动加载所有资源
  45. }], ['data', {
  46. loadAtLaunch: true,
  47. preloadAssets: [{
  48. path: 'csv',
  49. isDirectory: true
  50. }]
  51. }], ['prefabs', {
  52. loadAtLaunch: true,
  53. //参与启动加载
  54. preloadAssets: [{
  55. path: 'enemy/enemy',
  56. type: Prefab
  57. }, {
  58. path: 'enemy/pistol',
  59. type: Prefab
  60. }, {
  61. path: 'enemy/sniper_rifle',
  62. type: Prefab
  63. }, {
  64. path: 'enemy/scatter',
  65. type: Prefab
  66. }, {
  67. path: 'enemy/tank_pao',
  68. type: Prefab
  69. }, {
  70. path: 'enemy/pistol',
  71. type: Prefab
  72. }, {
  73. path: 'player/98k',
  74. type: Prefab
  75. }, {
  76. path: 'player/m24',
  77. type: Prefab
  78. }, {
  79. path: 'player/awm',
  80. type: Prefab
  81. }, {
  82. path: 'player/barrettM82A1',
  83. type: Prefab
  84. }, {
  85. path: 'player/m416',
  86. type: Prefab
  87. }, {
  88. path: 'player/akm',
  89. type: Prefab
  90. }, {
  91. path: 'player/vss',
  92. type: Prefab
  93. }, {
  94. path: 'player/sks',
  95. type: Prefab
  96. }, {
  97. path: 'texture/msg_hint/spriteFrame',
  98. type: SpriteFrame
  99. }, {
  100. path: 'texture/test_01/texture',
  101. type: Texture2D
  102. }, {
  103. path: 'texture/test_02/spriteFrame',
  104. type: SpriteFrame
  105. }]
  106. }]]));
  107. _cclegacy._RF.pop();
  108. _crd = false;
  109. }
  110. };
  111. });
  112. //# sourceMappingURL=11261ccc4b08ec4e0d7381b68a61ece8a9d52bd4.js.map