Talos docs

HudProps

Since 0.6
Plain text

Signature

export interface HudProps {
  /** Track these goals instead of discovering the scene's `goal` components. */
  goals?: GoalSpec[]
  /** Event that marks a goal reached. Default `goal-reached`. */
  goalEvent?: string
  /** Custom field for "2/5"; null to publish no progress. */
  progressField?: string | null
  /** Objective shown once every goal is reached. */
  completeKey?: string | null
  /** A string table, when the host does not provide one. */
  strings?: Record<string, string>
  /** Start a countdown of this many seconds at init. */
  timer?: number
  /** Initial score. */
  score?: number
}

Import: import type { HudProps } from "@argus/gameplay"

Members

MemberSignatureDescription
goalsgoals?: GoalSpec[]Track these goals instead of discovering the scene's goal components.
goalEventgoalEvent?: stringEvent that marks a goal reached. Default goal-reached.
progressFieldprogressField?: string | nullCustom field for "2/5"; null to publish no progress.
completeKeycompleteKey?: string | nullObjective shown once every goal is reached.
stringsstrings?: Record<string, string>A string table, when the host does not provide one.
timertimer?: numberStart a countdown of this many seconds at init.
scorescore?: numberInitial score.