Add score-o mode and split game map HUD presentation

This commit is contained in:
2026-03-24 12:27:45 +08:00
parent a117a25824
commit 0295893b56
18 changed files with 1121 additions and 113 deletions

View File

@@ -268,14 +268,15 @@ export class TelemetryRuntime {
this.reset()
}
syncGameState(definition: GameDefinition | null, state: GameSessionState | null): void {
syncGameState(definition: GameDefinition | null, state: GameSessionState | null, hudTargetControlId?: string | null): void {
if (!definition || !state) {
this.dispatch({ type: 'reset' })
return
}
const targetControl = state.currentTargetControlId
? definition.controls.find((control) => control.id === state.currentTargetControlId) || null
const targetControlId = hudTargetControlId !== undefined ? hudTargetControlId : state.currentTargetControlId
const targetControl = targetControlId
? definition.controls.find((control) => control.id === targetControlId) || null
: null
this.dispatch({