|
@@ -83,8 +83,10 @@ export class game_list extends Component {
|
|
|
this.start_pos = et.getUILocation()
|
|
|
})
|
|
|
this.content.on(Node.EventType.TOUCH_MOVE,(et:EventTouch)=>{
|
|
|
+ this.onTouchActive = false
|
|
|
if( Math.abs(this.start_pos.x-et.getUILocation().x)<30){
|
|
|
this.start_pos = et.getUILocation()
|
|
|
+ this.onTouchActive = true
|
|
|
return
|
|
|
}
|
|
|
let p = new Vec3(et.getUILocation().x,et.getUILocation().y)
|
|
@@ -108,6 +110,7 @@ export class game_list extends Component {
|
|
|
}
|
|
|
|
|
|
touchContentScroll() {
|
|
|
+ this.onTouchActive = true
|
|
|
if(this.content.position.x < 0) { // 向左滑动
|
|
|
this.onNextPage()
|
|
|
}
|
|
@@ -117,7 +120,6 @@ export class game_list extends Component {
|
|
|
}
|
|
|
|
|
|
updatePage(page:number){
|
|
|
- this.onTouchActive = false
|
|
|
this.content.removeAllChildren()
|
|
|
gameManager.getStaticUserData().select_page = page
|
|
|
gameManager.saveUserData()
|
|
@@ -128,10 +130,6 @@ export class game_list extends Component {
|
|
|
this.initGameList(msg)
|
|
|
}
|
|
|
})
|
|
|
- this.unscheduleAllCallbacks()
|
|
|
- this.scheduleOnce(()=> {
|
|
|
- this.onTouchActive = true
|
|
|
- },1)
|
|
|
}
|
|
|
|
|
|
onUpPage(){
|
|
@@ -163,10 +161,10 @@ export class game_list extends Component {
|
|
|
}
|
|
|
|
|
|
onItemClick(item:level_list_item){
|
|
|
- gameManager.Singleton.sys_click_button_music()
|
|
|
if(!this.onTouchActive){
|
|
|
return
|
|
|
}
|
|
|
+ gameManager.Singleton.sys_click_button_music()
|
|
|
if(!item.getIsUnLock()){
|
|
|
let userUnlockLevesData = gameManager.getUserUnlockLevesData()
|
|
|
if(userUnlockLevesData.status==1 && userUnlockLevesData.number>0) {
|