Add configurable game flow, finish punching, and audio cues
This commit is contained in:
@@ -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({
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user