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?
Defined in: apps/client/src/ui/Overlay.tsx:139
What the minimap centres on, published by the game loop every frame.
onCarHealth?
optionalonCarHealth?: (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
Returns
void
onClearWaypoint?
optionalonClearWaypoint?: () =>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:177
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?
optionalonCue?: (sound) =>void
Defined in: apps/client/src/ui/Overlay.tsx:191
Plays a menu cue.
Parameters
sound
Returns
void
onFit?
optionalonFit?: (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?
optionalonIgnite?: () =>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?
optionalonMap?: (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?
optionalonPause?: (open) =>void
Defined in: apps/client/src/ui/Overlay.tsx:187
Opens or closes the pause menu (Esc and the toolbar's Pause do the same).
Parameters
open
boolean
Returns
void
onPedestrian?
optionalonPedestrian?: (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
onPolice?
optionalonPolice?: (unit) =>void
Defined in: apps/client/src/ui/Overlay.tsx:175
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?
optionalonQuitToMenu?: () =>void
Defined in: apps/client/src/ui/Overlay.tsx:189
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?
optionalonRtcDrop?: () =>void
Defined in: apps/client/src/ui/Overlay.tsx:193
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?
optionalonSkip?: (hours) =>void
Defined in: apps/client/src/ui/Overlay.tsx:181
Skips the room clock so many hours on.
Parameters
hours
number
Returns
void
onSocial?
optionalonSocial?:SocialActions
Defined in: apps/client/src/ui/Overlay.tsx:183
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?
optionalonWaypoint?: (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?
optionalonWeather?: (request) =>void
Defined in: apps/client/src/ui/Overlay.tsx:179
Sets the room's weather: a kind at an intensity, its own way again, whether the dark hides.
Parameters
request
Returns
void
settings?
Defined in: apps/client/src/ui/Overlay.tsx:185
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.