Add configurable game flow, finish punching, and audio cues
This commit is contained in:
31
miniprogram/game/core/gameDefinition.ts
Normal file
31
miniprogram/game/core/gameDefinition.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { type LonLatPoint } from '../../utils/projection'
|
||||
|
||||
export type GameMode = 'classic-sequential'
|
||||
export type GameControlKind = 'start' | 'control' | 'finish'
|
||||
export type PunchPolicyType = 'enter' | 'enter-confirm'
|
||||
|
||||
export interface GameControlDisplayContent {
|
||||
title: string
|
||||
body: string
|
||||
}
|
||||
|
||||
export interface GameControl {
|
||||
id: string
|
||||
code: string
|
||||
label: string
|
||||
kind: GameControlKind
|
||||
point: LonLatPoint
|
||||
sequence: number | null
|
||||
displayContent: GameControlDisplayContent | null
|
||||
}
|
||||
|
||||
export interface GameDefinition {
|
||||
id: string
|
||||
mode: GameMode
|
||||
title: string
|
||||
controlRadiusMeters: number
|
||||
punchRadiusMeters: number
|
||||
punchPolicy: PunchPolicyType
|
||||
controls: GameControl[]
|
||||
autoFinishOnLastControl: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user