This commit is contained in:
dgflash
2025-08-14 20:10:17 +08:00
parent 9214411916
commit c2edf6692b

View File

@@ -26,7 +26,6 @@ export default class UIButton extends Button {
type: AudioClip
})
private effect: AudioClip = null!;
// private effectIds: number[] = [];
/** 触摸次数 */
private _touchCount = 0;
@@ -74,22 +73,9 @@ export default class UIButton extends Button {
}
/** 短按触摸音效 */
protected async playEffect() {
protected playEffect() {
if (this.effect) {
oops.audio.playEffect(this.effect);
// const effectId = await oops.audio.playEffect(this.effect, resLoader.defaultBundleName, () => {
// this.effectIds.remove(effectId);
// });
// if (effectId > 0) this.effectIds.push(effectId);
}
}
// onDestroy() {
// if (this.effect) {
// this.effectIds.forEach(effectId => {
// console.log(effectId);
// oops.audio.putEffect(effectId, this.effect);
// });
// }
// }
}