Commit b154567c authored by Master Q's avatar Master Q

GAME_RESUME

parent fa485400
......@@ -100,7 +100,7 @@
})
</script>
<!-- 构建的js -->
<script src="//yun.duiba.com.cn/db_games/activity/template/1655694745/output.js" crossorigin="anonymous"></script>
<script src="//yun.duiba.com.cn/db_games/activity/template/1655698388/output.js" crossorigin="anonymous"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -35,7 +35,7 @@ export default {
progress(),
BannerVariable({
values: {
__ENV__: JSON.stringify(process.env.NODE_ENV || 'development'),
__ENV__: JSON.stringify(process.env.NODE_ENV || 'pord'),
__version__: JSON.stringify(version),
__buildDate__: JSON.stringify(new Date()),
}
......
......@@ -621,5 +621,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1655694731/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1655698376/resource/"
}
\ No newline at end of file
......@@ -46,7 +46,8 @@ export class BalalaScene extends Module {
}
set score(v: number) {
this.scoreText.text = '+' + (~~v) + ''
this._score = v
this.scoreText.text = '+' + v + ''
}
countDownText: FYGE.BitmapText
......@@ -202,7 +203,7 @@ export class BalalaScene extends Module {
* @param e
*/
onCalcScore(e: FYGE.Event) {
this.score = e.data
this.score = ~~e.data
}
/**
......@@ -277,7 +278,9 @@ export class BalalaScene extends Module {
* 复活
*/
async onResurrectionForResume() {
await sendWebNet(WebNetName.revive)
await sendWebNet(WebNetName.revive, {
startId: getWebData(WebNetName.start).data.startId,
})
this.resurrectionTimes += 1
this.onResume()
this.countDownFactory.resume()
......
......@@ -90,6 +90,10 @@ export class ParkourScene extends Scene {
this.isPaused = true
}
onGameResume() {
this.isPaused = false
}
/**
* 判断下一个障碍物 是否可以出,防止必死的情况
......@@ -122,6 +126,8 @@ export class ParkourScene extends Scene {
GDispatcher.addEventListener(ParkourGameEvents.GAME_PAUSE, this.onGamePause, this)
GDispatcher.addEventListener(ParkourGameEvents.GAME_RESUME, this.onGameResume, this)
this.stage.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onGameDetermineMouseDown, this)
// 测试碰撞检测用的
......@@ -135,6 +141,8 @@ export class ParkourScene extends Scene {
GDispatcher.removeEventListener(ParkourGameEvents.GAME_PAUSE, this.onGamePause, this)
GDispatcher.removeEventListener(ParkourGameEvents.GAME_RESUME, this.onGameResume, this)
this.stage.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onGameDetermineMouseDown, this)
}
......
......@@ -64,7 +64,7 @@ export function sendWebNet(
headers?: any,
): Promise<dataOut> {
return new Promise((resolve, reject) => {
console.info('__ENV__:', __ENV__)
if (__ENV__ == "development") { // TODO 编译后提供的变量
let path = netName.split('{projectId}/')[1];//后缀名字之前的是文件夹,mock里结构
if (path.indexOf('/') <= -1) path = `projectX/${path}`;
......
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