@cc-component/cc-core 1.6.9 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,7 +98,7 @@ export class AudioUtil {
98
98
  bundle?: string;
99
99
  loop?: boolean;
100
100
  volume?: number;
101
- callback?: () => void
101
+ complete?: () => void;
102
102
  }) {
103
103
  try {
104
104
  const clip = await this.loadAudioClip(params.bundle, params.path);
@@ -109,7 +109,7 @@ export class AudioUtil {
109
109
  this._audioSource.volume = params.volume ?? this.music_volume;
110
110
 
111
111
  // 设置完成回调(仅非循环时有意义)
112
- this._musicCompleteCallback = (!params.loop && params.callback) ? params.callback : undefined;
112
+ this._musicCompleteCallback = (!params.loop && params.complete) ? params.complete : undefined;
113
113
 
114
114
  this._audioSource.play();
115
115
  } catch (e) {
@@ -92,7 +92,7 @@ export class EffectSingleCase {
92
92
 
93
93
  for (let i = 0; i < count; i++) {
94
94
  let node = instantiate(App.GetAsset(params.bundle, params.path))//ViewUtil.createPrefabNode(path, bundleName);
95
- node.asset_path = App.res.getAssetKey(params.path, params.bundle)
95
+ node.asset_path = App.asset.getAssetKey(params.path, params.bundle)
96
96
  np.put(node);
97
97
  }
98
98
  resolve();
@@ -148,7 +148,7 @@ export class EffectSingleCase {
148
148
  if (params && params.bundle) bundleName = params.bundle;
149
149
  node = instantiate(App.GetAsset(bundleName, params.path))//ViewUtil.createPrefabNode(path, bundleName);
150
150
  // //@ts-ignore
151
- node.asset_path = App.res.getAssetKey(params.path, params.bundle)
151
+ node.asset_path = App.asset.getAssetKey(params.path, params.bundle)
152
152
  // if (params && params.isPlayFinishedRelease) {
153
153
  // node.addComponent(EffectFinishedRelease);
154
154
  // }
@@ -292,7 +292,7 @@ export class EffectSingleCase {
292
292
  this.res.set(params.path, params.bundle);
293
293
  const prefab = await App.LoadAsset(params.bundle, params.path, Prefab);
294
294
  const node = instantiate(prefab)
295
- node.asset_path = App.res.getAssetKey(params.path, params.bundle)
295
+ node.asset_path = App.asset.getAssetKey(params.path, params.bundle)
296
296
  this.updateNode(node, params)
297
297
  resolve(node);
298
298
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-core",
3
- "version": "1.6.9",
3
+ "version": "1.7.1",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",