Add score-o mode and split game map HUD presentation
This commit is contained in:
21
miniprogram/game/presentation/hudPresentationState.ts
Normal file
21
miniprogram/game/presentation/hudPresentationState.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export interface HudPresentationState {
|
||||
actionTagText: string
|
||||
distanceTagText: string
|
||||
hudTargetControlId: string | null
|
||||
progressText: string
|
||||
punchableControlId: string | null
|
||||
punchButtonEnabled: boolean
|
||||
punchButtonText: string
|
||||
punchHintText: string
|
||||
}
|
||||
|
||||
export const EMPTY_HUD_PRESENTATION_STATE: HudPresentationState = {
|
||||
actionTagText: '目标',
|
||||
distanceTagText: '点距',
|
||||
hudTargetControlId: null,
|
||||
progressText: '0/0',
|
||||
punchableControlId: null,
|
||||
punchButtonEnabled: false,
|
||||
punchButtonText: '打点',
|
||||
punchHintText: '等待进入检查点范围',
|
||||
}
|
||||
41
miniprogram/game/presentation/mapPresentationState.ts
Normal file
41
miniprogram/game/presentation/mapPresentationState.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
export interface MapPresentationState {
|
||||
controlVisualMode: 'single-target' | 'multi-target'
|
||||
showCourseLegs: boolean
|
||||
guidanceLegAnimationEnabled: boolean
|
||||
focusableControlIds: string[]
|
||||
focusedControlId: string | null
|
||||
focusedControlSequences: number[]
|
||||
activeControlIds: string[]
|
||||
activeControlSequences: number[]
|
||||
activeStart: boolean
|
||||
completedStart: boolean
|
||||
activeFinish: boolean
|
||||
focusedFinish: boolean
|
||||
completedFinish: boolean
|
||||
revealFullCourse: boolean
|
||||
activeLegIndices: number[]
|
||||
completedLegIndices: number[]
|
||||
completedControlIds: string[]
|
||||
completedControlSequences: number[]
|
||||
}
|
||||
|
||||
export const EMPTY_MAP_PRESENTATION_STATE: MapPresentationState = {
|
||||
controlVisualMode: 'single-target',
|
||||
showCourseLegs: true,
|
||||
guidanceLegAnimationEnabled: true,
|
||||
focusableControlIds: [],
|
||||
focusedControlId: null,
|
||||
focusedControlSequences: [],
|
||||
activeControlIds: [],
|
||||
activeControlSequences: [],
|
||||
activeStart: false,
|
||||
completedStart: false,
|
||||
activeFinish: false,
|
||||
focusedFinish: false,
|
||||
completedFinish: false,
|
||||
revealFullCourse: false,
|
||||
activeLegIndices: [],
|
||||
completedLegIndices: [],
|
||||
completedControlIds: [],
|
||||
completedControlSequences: [],
|
||||
}
|
||||
@@ -1,39 +1,14 @@
|
||||
import { EMPTY_HUD_PRESENTATION_STATE, type HudPresentationState } from './hudPresentationState'
|
||||
import { EMPTY_MAP_PRESENTATION_STATE, type MapPresentationState } from './mapPresentationState'
|
||||
|
||||
export interface GamePresentationState {
|
||||
activeControlIds: string[]
|
||||
activeControlSequences: number[]
|
||||
activeStart: boolean
|
||||
completedStart: boolean
|
||||
activeFinish: boolean
|
||||
completedFinish: boolean
|
||||
revealFullCourse: boolean
|
||||
activeLegIndices: number[]
|
||||
completedLegIndices: number[]
|
||||
completedControlIds: string[]
|
||||
completedControlSequences: number[]
|
||||
progressText: string
|
||||
punchableControlId: string | null
|
||||
punchButtonEnabled: boolean
|
||||
punchButtonText: string
|
||||
punchHintText: string
|
||||
map: MapPresentationState
|
||||
hud: HudPresentationState
|
||||
}
|
||||
|
||||
export const EMPTY_GAME_PRESENTATION_STATE: GamePresentationState = {
|
||||
activeControlIds: [],
|
||||
activeControlSequences: [],
|
||||
activeStart: false,
|
||||
completedStart: false,
|
||||
activeFinish: false,
|
||||
completedFinish: false,
|
||||
revealFullCourse: false,
|
||||
activeLegIndices: [],
|
||||
completedLegIndices: [],
|
||||
completedControlIds: [],
|
||||
completedControlSequences: [],
|
||||
progressText: '0/0',
|
||||
punchableControlId: null,
|
||||
punchButtonEnabled: false,
|
||||
punchButtonText: '打点',
|
||||
punchHintText: '等待进入检查点范围',
|
||||
map: EMPTY_MAP_PRESENTATION_STATE,
|
||||
hud: EMPTY_HUD_PRESENTATION_STATE,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user