From 74016b54f2c81e85cbdd3b4db909fd5534cb2499 Mon Sep 17 00:00:00 2001 From: dgflash Date: Wed, 20 Nov 2024 17:10:17 +0800 Subject: [PATCH] =?UTF-8?q?GameComponent.playEffect=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=B8=AD=E5=88=A0=E9=99=A4=E9=9F=B3=E6=95=88=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=99=A8=E5=94=AF=E4=B8=80id=E6=95=B0=E6=8D=AE=EF=BC=8C?= =?UTF-8?q?=E5=87=8F=E5=B0=8F=E4=B8=80=E4=B8=AA=E5=9C=BA=E6=99=AF=E5=8F=8D?= =?UTF-8?q?=E5=A4=8D=E4=BD=BF=E7=94=A8=E9=9F=B3=E6=95=88=E6=97=B6=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E8=AE=B0=E5=BD=95=E8=B5=84=E6=BA=90=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/module/common/GameComponent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/module/common/GameComponent.ts b/assets/module/common/GameComponent.ts index b249c9f..857b364 100644 --- a/assets/module/common/GameComponent.ts +++ b/assets/module/common/GameComponent.ts @@ -342,14 +342,14 @@ export class GameComponent extends Component { */ async playEffect(url: string, bundleName?: string) { if (bundleName == null) bundleName = oops.res.defaultBundleName; - const id = await oops.audio.playEffect(url, bundleName, () => { + await oops.audio.playEffect(url, bundleName, () => { const rps = this.resPaths.get(ResType.Audio); if (rps) { - const key = this.getResKey(bundleName, url, id); + const key = this.getResKey(bundleName, url); rps.delete(key); } }); - this.addPathToRecord(ResType.Audio, bundleName, url, id); + this.addPathToRecord(ResType.Audio, bundleName, url); } //#endregion