Skip to content

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

Interface: OverlayProps ​

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

Props of the overlay.

Properties ​

follow? ​

optional follow?: Store<MapCentre | undefined>

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

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:175

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:163

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:151

Takes the waypoint away.

Returns ​

void


onClock ​

onClock: (minutes, pace) => void

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

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:161

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

Parameters ​

on ​

boolean

Returns ​

void


onCop? ​

optional onCop?: (order, at?) => void

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

A cop's order (P1, P2): backup after a robber, or the dispatcher's at a point of the ground (m).

Parameters ​

order ​

"swat" | "roadblock" | "drone" | "cruiser"

at? ​
x ​

number

z ​

number

Returns ​

void


onCue? ​

optional onCue?: (sound) => void

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

Plays a menu cue.

Parameters ​

sound ​

UiSound

Returns ​

void


onFit? ​

optional onFit?: (mod) => void

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

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

Parameters ​

mod ​

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

Returns ​

void


onFov ​

onFov: (scene, minimap) => void

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

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:179

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:165

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:147

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:167

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:193

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:173

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

Parameters ​

ahead ​

number

Returns ​

void


onPolice? ​

optional onPolice?: (unit) => void

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

Sends a unit of the heavy response after the player now, alone (the debug command police).

Parameters ​

unit ​

NonNullable<"boat" | "apc" | "dart" | "grappler" | "helicopter" | "sniper" | "cannon" | "bike" | undefined>

Returns ​

void


onQuitToMenu? ​

optional onQuitToMenu?: () => void

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

Leaves the game for the main menu.

Returns ​

void


onResetLevel ​

onResetLevel: () => void

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

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

Returns ​

void


onRole? ​

optional onRole?: (role) => void

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

Takes a role in the player's team before the run goes live (or gives theirs up).

Parameters ​

role ​

"none" | RunRole

Returns ​

void


onRtcDrop? ​

optional onRtcDrop?: () => void

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

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:187

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:189

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:169

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:155

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

Returns ​

void


onToggleMusic ​

onToggleMusic: () => void

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

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:171

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:149

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:185

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:191

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


store ​

store: Store<OverlayState>

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

The game loop's store.