|
@@ -19,8 +19,7 @@ export class audioManager extends Component {
|
|
this.init()
|
|
this.init()
|
|
}
|
|
}
|
|
protected onLoad(): void {
|
|
protected onLoad(): void {
|
|
- let setting_data = GameManager.getSettingData()
|
|
|
|
- if(setting_data.isOpenYinYue==false) { return }
|
|
|
|
|
|
+ if(GameManager.getSettingData().isOpenYinYue==false) { return }
|
|
this.scheduleOnce(()=>{
|
|
this.scheduleOnce(()=>{
|
|
this.playMusic(config.AUDIO.home_bgm)
|
|
this.playMusic(config.AUDIO.home_bgm)
|
|
},3)
|
|
},3)
|
|
@@ -58,6 +57,7 @@ export class audioManager extends Component {
|
|
clip_node.getComponent(AudioSource).play()
|
|
clip_node.getComponent(AudioSource).play()
|
|
}
|
|
}
|
|
public playMusic(path:string){
|
|
public playMusic(path:string){
|
|
|
|
+ if(!GameManager.getSettingData().isOpenYinYue) {return}
|
|
if(this.audios_map.get(path)!=null){
|
|
if(this.audios_map.get(path)!=null){
|
|
this.playBGM(this.audios_map.get(path))
|
|
this.playBGM(this.audios_map.get(path))
|
|
}else{
|
|
}else{
|
|
@@ -101,6 +101,7 @@ export class audioManager extends Component {
|
|
}
|
|
}
|
|
|
|
|
|
public playHomeBgm() {
|
|
public playHomeBgm() {
|
|
|
|
+ if(!GameManager.getSettingData().isOpenYinYue) {return}
|
|
if(this.getSound().clip==null){
|
|
if(this.getSound().clip==null){
|
|
this.playMusic(config.AUDIO.home_bgm)
|
|
this.playMusic(config.AUDIO.home_bgm)
|
|
} else {
|
|
} else {
|