Add configurable game flow, finish punching, and audio cues

This commit is contained in:
2026-03-23 19:35:17 +08:00
parent 3b4b3ee3ec
commit 48159be900
23 changed files with 1620 additions and 68 deletions

View File

@@ -97,8 +97,18 @@ Page({
panelTimerText: '00:00:00',
panelMileageText: '0m',
panelDistanceValueText: '108',
panelProgressText: '0/14',
panelProgressText: '0/0',
gameSessionStatus: 'idle',
panelSpeedValueText: '0',
punchButtonText: '打点',
punchButtonEnabled: false,
punchHintText: '等待进入检查点范围',
punchFeedbackVisible: false,
punchFeedbackText: '',
punchFeedbackTone: 'neutral',
contentCardVisible: false,
contentCardTitle: '',
contentCardBody: '',
compassTicks: buildCompassTicks(),
compassLabels: buildCompassLabels(),
...buildSideButtonVisibility('left'),
@@ -124,8 +134,18 @@ Page({
panelTimerText: '00:00:00',
panelMileageText: '0m',
panelDistanceValueText: '108',
panelProgressText: '0/14',
panelProgressText: '0/0',
gameSessionStatus: 'idle',
panelSpeedValueText: '0',
punchButtonText: '打点',
punchButtonEnabled: false,
punchHintText: '等待进入检查点范围',
punchFeedbackVisible: false,
punchFeedbackText: '',
punchFeedbackTone: 'neutral',
contentCardVisible: false,
contentCardTitle: '',
contentCardBody: '',
compassTicks: buildCompassTicks(),
compassLabels: buildCompassLabels(),
...buildSideButtonVisibility('left'),
@@ -311,6 +331,30 @@ Page({
}
},
handleStartGame() {
if (mapEngine) {
mapEngine.handleStartGame()
}
},
handleOverlayTouch() {},
handlePunchAction() {
if (!this.data.punchButtonEnabled) {
return
}
if (mapEngine) {
mapEngine.handlePunchAction()
}
},
handleCloseContentCard() {
if (mapEngine) {
mapEngine.closeContentCard()
}
},
handleCycleSideButtons() {
this.setData(buildSideButtonVisibility(getNextSideButtonMode(this.data.sideButtonMode)))
},
@@ -378,6 +422,9 @@ Page({