Options
All
  • Public
  • Public/Protected
  • All
Menu

The GameHUD is a class for displaying heads up information on the screen such as the map name, player name, and time left.

Hierarchy

  • GameHUD

Index

Constructors

constructor

Properties

Private deaths

deaths: HTMLElement

Private debug

debug: HTMLElement

Private fps

fps: HTMLElement

Private kills

kills: HTMLElement

Private mapName

mapName: HTMLElement

Private playerName

playerName: HTMLElement

Private respawnCon

respawnCon: HTMLElement

Private scoreboard

scoreboard: HTMLElement

Private settings

settings: HTMLElement

Private socketStatus

socketStatus: HTMLElement

Private tickerCon

tickerCon: HTMLElement

Private timer

timer: HTMLElement

Private timerValue

timerValue: number

Static Private Readonly ROUND_TIME_SEC

ROUND_TIME_SEC: number = ...

Static Private Readonly SEC_TO_MILLISEC_FACTOR

SEC_TO_MILLISEC_FACTOR: 1000 = 1_000

Static Private Readonly SEC_TO_NANOSEC_FACTOR

SEC_TO_NANOSEC_FACTOR: bigint = ...

Methods

displayRespawn

  • displayRespawn(isDead: boolean): void

initializeHud

  • initializeHud(map: string, player: PlayerInfo): void

setTimer

  • setTimer(time: BigInt): void
  • Time left until end of round

    Parameters

    • time: BigInt

      UNIX timestamp

    Returns void

showMapInfo

  • showMapInfo(map: string): void
  • Displays current Map Name and PlayerName

    Parameters

    • map: string

      Name of the current Map

    Returns void

showSocketStatus

  • showSocketStatus(msg: string): void
  • Parameters

    • msg: string

      Message to show about the socket status

    Returns void

showTicket

  • showTicket(msg: string): void
  • Ticker in corner

    Parameters

    • msg: string

      Message that should be displayed

    Returns void

toggleFPS

  • toggleFPS(): void

toggleScoreboard

  • toggleScoreboard(): void

toggleSettings

  • toggleSettings(): void

updatePlayerInfo

  • Displays Kill Count and Death Count of current Player

    Parameters

    • playerInfo: PlayerInfo

      Info of the current Player

    Returns void

updateScoreboard

updateTimer

  • updateTimer(): void
  • Calculates human readable time from unix time and displays on HUD. If 5 seconds before round end, shows a ticket about map changing.

    Returns void

Generated using TypeDoc