This commit is contained in:
2026-05-19 11:55:24 +08:00
parent f62f6b4ac9
commit 4ee43cf71a
462 changed files with 75251 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import Audio from './Audio';
export default class AudioManager {
private static _inst: AudioManager = null;
static get inst() {
if (!this._inst) this._inst = new AudioManager();
return this._inst;
}
private constructor() { }
private audioArray: Audio[] = [];
getAudio() {
if (this.audioArray.length) {
return this.audioArray.pop();
}
return new Audio();
}
putAudio(audio: Audio) {
audio.clear();
this.audioArray.push(audio);
}
}