Skip to content

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

Interface: OverlayProps ​

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

Props of the overlay.

Properties ​

onCarHealth? ​

optional onCarHealth?: (health) => void

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

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

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

Parameters ​

cmd ​

"spawnChaser" | "clearChasers"

request ​

ChaserRequest

Returns ​

void


onClock ​

onClock: (minutes, pace) => void

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

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

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

Plays a menu cue.

Parameters ​

sound ​

UiSound

Returns ​

void


onFov ​

onFov: (scene, minimap) => void

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

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

Parameters ​

scene ​

boolean

minimap ​

boolean

Returns ​

void


onInvincible ​

onInvincible: (on) => void

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

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

Parameters ​

on ​

boolean

Returns ​

void


onMaxHealth ​

onMaxHealth: (health) => void

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

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

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

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

Leaves the game for the main menu.

Returns ​

void


onResetLevel ​

onResetLevel: () => void

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

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

Returns ​

void


onRtcDrop? ​

optional onRtcDrop?: () => void

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

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

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

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

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

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

Returns ​

void


onToggleMusic ​

onToggleMusic: () => void

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

Toggles the music (the M key does the same).

Returns ​

void


onWanted ​

onWanted: (stars) => void

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

Sets the player's Wanted level to so many stars (0 clears it).

Parameters ​

stars ​

number

Returns ​

void


onWeather? ​

optional onWeather?: (request) => void

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

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

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


store ​

store: Store<OverlayState>

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

The game loop's store.