12345678910111213141516171819202122232425262728 |
- var t = require;
- var e = module;
- var i = exports;
- Object.defineProperty(i, "__esModule", {value: !0});
- t = t("BaseSound");
- i.default = class extends t.default {
- constructor() {
- super(), (this._currBg = ""), (this._currBg = "");
- }
- stop() {
- cc.audioEngine.stopMusic(), (this._currBg = "");
- }
- play(t) {
- this._currBg != t && (this.stop(), (this._currBg = t), (t = this.getSound(t)) && this.playSound(t));
- }
- playSound(t) {
- cc.audioEngine.playMusic(t, !0);
- }
- setVolume(t) {
- (this._volume = t), cc.audioEngine.setMusicVolume(t);
- }
- loadedPlay(t) {
- this._currBg == t.name && this.playSound(t);
- }
- checkCanClear(t) {
- return this._currBg != t;
- }
- };
|