Talos docs

StartCountdownRun

Since 0.7

The 3-2-1-GO!

Plain text

controller startCountdown hands back.

Signature

export class StartCountdownRun {
  constructor(ctx: Ctx<any, any>, options: StartCountdownOptions = {})
  get phase(): CountdownPhase
  get started(): boolean
  get holding(): boolean
  start(): void
  update(dt: number): void
}

Import: import { StartCountdownRun } from "@argus/gameplay"

Members

MemberSignatureDescription
constructorconstructor(ctx: Ctx<any, any>, options: StartCountdownOptions = {})A countdown for the behaviour that owns ctx, idle until start(); startCountdown(ctx, options) is the same.
phaseget phase(): CountdownPhaseWhat it shows now.
startedget started(): booleanThe start event has fired.
holdingget holding(): booleanThe input context is held until GO!.
startstart(): voidBegin (or restart) the count from the first figure, shown at once.
updateupdate(dt: number): voidOne tick. Before start() and after the end it does nothing.