|
@@ -71,7 +71,7 @@ export class scene_layer extends Component {
|
|
|
|
|
|
addAudioItemAndPlay(res:string, volume:number,isLopp:boolean = false){
|
|
|
// let content = this.getCurScenePage().node;
|
|
|
- let content = this.node;
|
|
|
+ let content = this.content;
|
|
|
let audio_node = this.mAudioList.get(res)
|
|
|
if(audio_node==null){
|
|
|
audio_node = new Node
|
|
@@ -111,7 +111,12 @@ export class scene_layer extends Component {
|
|
|
onChangeUpdatePages(){
|
|
|
for (let index = 0; index < this.content.children.length; index++) {
|
|
|
const page = this.content.children[index];
|
|
|
- page.active = (this.mCurPage == index)
|
|
|
+ if(page.getComponent(AudioSource)!=null){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ page.active = (this.mCurPage == index)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|