Skip to content

five-on-it / apps/client/src/ui/Overlay / OverlayProps

Interface: OverlayProps ​

Defined in: apps/client/src/ui/Overlay.tsx:135

Props of the overlay.

Properties ​

follow? ​

optional follow?: Store<MapCentre | undefined>

Defined in: apps/client/src/ui/Overlay.tsx:139

What the minimap centres on, published by the game loop every frame.


onCarHealth? ​

optional onCarHealth?: (health) => void

Defined in: apps/client/src/ui/Overlay.tsx:169

Sets the health of the car the player sits in.

Parameters ​

health ​

number

Returns ​

void


onChaser ​

onChaser: (cmd, request) => void

Defined in: apps/client/src/ui/Overlay.tsx:157

Drops a chaser behind the player as the request says, or clears every chaser.

Parameters ​

cmd ​

"spawnChaser" | "clearChasers"

request ​

ChaserRequest

Returns ​

void


onClearWaypoint? ​

optional onClearWaypoint?: () => void

Defined in: apps/client/src/ui/Overlay.tsx:145

Takes the waypoint away.

Returns ​

void


onClock ​

onClock: (minutes, pace) => void

Defined in: apps/client/src/ui/Overlay.tsx:175

Sets the room clock to a time (minutes after midnight), its pace, or both.

Parameters ​

minutes ​

number | undefined

pace ​

number | undefined

Returns ​

void


onColliders ​

onColliders: (on) => void

Defined in: apps/client/src/ui/Overlay.tsx:155

Draws the collision wireframe over the level, or hides it again.

Parameters ​

on ​

boolean

Returns ​

void


onCue? ​

optional onCue?: (sound) => void

Defined in: apps/client/src/ui/Overlay.tsx:189

Plays a menu cue.

Parameters ​

sound ​

UiSound

Returns ​

void


onFit? ​

optional onFit?: (mod) => void

Defined in: apps/client/src/ui/Overlay.tsx:171

Fits the car the player sits in with an upgrade of the mod garage's (mods.ts).

Parameters ​

mod ​

"runFlats" | "caltrops" | "oil" | "bullBar" | "plating" | "nitro"

Returns ​

void


onFov ​

onFov: (scene, minimap) => void

Defined in: apps/client/src/ui/Overlay.tsx:153

Shows or hides the NPC view cones in the scene and on the minimap.

Parameters ​

scene ​

boolean

minimap ​

boolean

Returns ​

void


onIgnite? ​

optional onIgnite?: () => void

Defined in: apps/client/src/ui/Overlay.tsx:173

Sets alight the nearest car to the player but their own.

Returns ​

void


onInvincible ​

onInvincible: (on) => void

Defined in: apps/client/src/ui/Overlay.tsx:159

Makes the player's character invincible, or mortal again.

Parameters ​

on ​

boolean

Returns ​

void


onMap? ​

optional onMap?: (open) => void

Defined in: apps/client/src/ui/Overlay.tsx:141

Opens or closes the full map (the map key and Esc do the same).

Parameters ​

open ​

boolean

Returns ​

void


onMaxHealth ​

onMaxHealth: (health) => void

Defined in: apps/client/src/ui/Overlay.tsx:161

Gives the player's character its own full health.

Parameters ​

health ​

number

Returns ​

void


onPause? ​

optional onPause?: (open) => void

Defined in: apps/client/src/ui/Overlay.tsx:185

Opens or closes the pause menu (Esc and the toolbar's Pause do the same).

Parameters ​

open ​

boolean

Returns ​

void


onPedestrian? ​

optional onPedestrian?: (ahead) => void

Defined in: apps/client/src/ui/Overlay.tsx:167

Stands a pedestrian at a post so many metres ahead of the player.

Parameters ​

ahead ​

number

Returns ​

void


onQuitToMenu? ​

optional onQuitToMenu?: () => void

Defined in: apps/client/src/ui/Overlay.tsx:187

Leaves the game for the main menu.

Returns ​

void


onResetLevel ​

onResetLevel: () => void

Defined in: apps/client/src/ui/Overlay.tsx:151

Resets the whole level (the Backspace key does the same).

Returns ​

void


onRtcDrop? ​

optional onRtcDrop?: () => void

Defined in: apps/client/src/ui/Overlay.tsx:191

Asks the server to drop its side of the page's data channel (the debug command rtcDrop): the page falls back to its WebSocket.

Returns ​

void


onSkip? ​

optional onSkip?: (hours) => void

Defined in: apps/client/src/ui/Overlay.tsx:179

Skips the room clock so many hours on.

Parameters ​

hours ​

number

Returns ​

void


onSocial? ​

optional onSocial?: SocialActions

Defined in: apps/client/src/ui/Overlay.tsx:181

What the chat and the Social tab do, once the page has its social side.


onTeleport ​

onTeleport: (road) => void

Defined in: apps/client/src/ui/Overlay.tsx:163

Puts the player on a road of the level by its name.

Parameters ​

road ​

string

Returns ​

void


onToggleHud ​

onToggleHud: () => void

Defined in: apps/client/src/ui/Overlay.tsx:149

Hides or shows the HUD (the H key does the same).

Returns ​

void


onToggleMusic ​

onToggleMusic: () => void

Defined in: apps/client/src/ui/Overlay.tsx:147

Toggles the music (the music key, U, does the same).

Returns ​

void


onWanted ​

onWanted: (stars, heat?) => void

Defined in: apps/client/src/ui/Overlay.tsx:165

Sets the player's Wanted level to so many stars (0 clears it), at a Heat when one is given.

Parameters ​

stars ​

number

heat? ​

number

Returns ​

void


onWaypoint? ​

optional onWaypoint?: (x, z) => void

Defined in: apps/client/src/ui/Overlay.tsx:143

Drops the waypoint at a point of the ground (a click on the full map).

Parameters ​

x ​

number

z ​

number

Returns ​

void


onWeather? ​

optional onWeather?: (request) => void

Defined in: apps/client/src/ui/Overlay.tsx:177

Sets the room's weather: a kind at an intensity, its own way again, whether the dark hides.

Parameters ​

request ​

WeatherRequest

Returns ​

void


settings? ​

optional settings?: Store<Settings>

Defined in: apps/client/src/ui/Overlay.tsx:183

The player's settings, which the pause menu's Settings screen edits.


store ​

store: Store<OverlayState>

Defined in: apps/client/src/ui/Overlay.tsx:137

The game loop's store.