|
@@ -167,31 +167,33 @@ export class scene_layer extends Component {
|
|
|
}
|
|
|
|
|
|
onUp(){
|
|
|
+ let cur_page = this.mCurPage
|
|
|
let up_page = this.mCurPage -1;
|
|
|
if(up_page>=0){
|
|
|
- this.onClickCurPageDirectionButton(true)
|
|
|
gameManager.Singleton.onLaunch(()=>{
|
|
|
this.changePage(up_page)
|
|
|
+ this.onClickCurPageDirectionButton(cur_page, true)
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
onNext(){
|
|
|
+ let cur_page = this.mCurPage
|
|
|
let next_page = this.mCurPage +1;
|
|
|
if(next_page<this.mScenePages.length){
|
|
|
- this.onClickCurPageDirectionButton(false)
|
|
|
gameManager.Singleton.onLaunch(()=>{
|
|
|
this.changePage(next_page)
|
|
|
+ this.onClickCurPageDirectionButton(cur_page, false)
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- onClickCurPageDirectionButton(isUp:boolean) {
|
|
|
+ onClickCurPageDirectionButton(curPage:number, isUp:boolean) {
|
|
|
if(this.mSceneTask == null) {
|
|
|
return
|
|
|
}
|
|
|
let event_id = -1
|
|
|
- var key = this.mCurPage + ''
|
|
|
+ var key = curPage + ''
|
|
|
if(isUp) {
|
|
|
key = key + this.up_id_string
|
|
|
} else {
|
|
@@ -203,9 +205,7 @@ export class scene_layer extends Component {
|
|
|
}
|
|
|
// console.log('event_id=',event_id)
|
|
|
if(event_id != -1) {
|
|
|
- this.scheduleOnce(()=>{ // 切换场景有延时0.7
|
|
|
- this.checkDelayTimeNextEvent(event_id, eventTarget)
|
|
|
- },0.7)
|
|
|
+ this.checkDelayTimeNextEvent(event_id, eventTarget)
|
|
|
}
|
|
|
}
|
|
|
|