mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-05-08 03:16:49 +08:00
优化
This commit is contained in:
@@ -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);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user