Commit e161d0e3 authored by qi's avatar qi

更改写法

parent a6b8335c
......@@ -755,5 +755,5 @@ export const ResJson = {
"name": "svga"
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678373209/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678376631/resource/"
}
\ No newline at end of file
......@@ -95,19 +95,17 @@ export class GameScene extends Scene {
// 添加指向的事件
this.left.addEventListener(FYGE.MouseEvent.CLICK, () => {
let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
let stageHeight = this.stage.stageHeight;
if (item.y + this.bgCon.y - 200 > 0 && !this._role.isMove && this._role.currentIndex%2 == 0){
this.left.startAniRange(1, undefined, 1, () => {
console.log('this._role.currentIndex', this._role.currentIndex)
this._role.leftMove({
item: item
}, this.collectWordTx.bind(this))
}, this.collectWordTx.bind(this, item))
})
}
})
this.right.addEventListener(FYGE.MouseEvent.CLICK, () => {
let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
let stageHeight = this.stage.stageHeight;
if (item.y + this.bgCon.y - 200 > 0 && !this._role.isMove && this._role.currentIndex%2 == 1){
this.right.startAniRange(1, undefined, 1, () => {
console.log('this._role.currentIndex', this._role.currentIndex)
......@@ -115,7 +113,7 @@ export class GameScene extends Scene {
console.log("播放完成")
this._role.rightMove({
item: item
}, this.collectWordTx.bind(this))
}, this.collectWordTx.bind(this, item))
})
}
})
......@@ -244,7 +242,7 @@ export class GameScene extends Scene {
y: item.y
}, {
item:item
}, this.collectWordTx.bind(this))
}, this.collectWordTx.bind(this, item))
}
}
......
......@@ -7,7 +7,6 @@ export default class Role extends FYGE.Container {
downSvga;
lightSvga;
currentIndex = -2;
position;
item;
isMove;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment