Skip to content

five-on-it / apps/client/src/renderer/game / Game

Interface: Game ​

Defined in: apps/client/src/renderer/game.ts:407

A running game.

Methods ​

clearChasers() ​

clearChasers(): void

Defined in: apps/client/src/renderer/game.ts:437

Asks the server to remove every chaser.

Returns ​

void


clearWaypoint() ​

clearWaypoint(): void

Defined in: apps/client/src/renderer/game.ts:419

Takes the waypoint away.

Returns ​

void


dropWaypoint() ​

dropWaypoint(x, z): void

Defined in: apps/client/src/renderer/game.ts:417

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

Parameters ​

x ​

number

z ​

number

Returns ​

void


fitCar() ​

fitCar(mods): void

Defined in: apps/client/src/renderer/game.ts:461

Asks the server to fit the car the player sits in with upgrades (mods.ts' MOD_SHOP ids; a debug command).

Parameters ​

mods ​

("runFlats" | "caltrops" | "oil" | "bullBar" | "plating" | "nitro")[]

Returns ​

void


igniteNearest() ​

igniteNearest(): void

Defined in: apps/client/src/renderer/game.ts:463

Asks the server to set alight the nearest car to the player but their own (a debug command).

Returns ​

void


ownsKey() ​

ownsKey(event): boolean

Defined in: apps/client/src/renderer/game.ts:465

Whether a key press went to the in-game UI (a field typed into) rather than to the game.

Parameters ​

event ​

KeyboardEvent

Returns ​

boolean


pedestrianAhead() ​

pedestrianAhead(ahead): void

Defined in: apps/client/src/renderer/game.ts:457

Asks the server to stand a pedestrian at a post so many metres ahead of the player (a debug command).

Parameters ​

ahead ​

number

Returns ​

void


resetLevel() ​

resetLevel(): void

Defined in: apps/client/src/renderer/game.ts:425

Asks the server to reset the whole level (the Backspace key does the same).

Returns ​

void


setCarHealth() ​

setCarHealth(health): void

Defined in: apps/client/src/renderer/game.ts:459

Asks the server to set the health of the car the player sits in (a debug command).

Parameters ​

health ​

number

Returns ​

void


setClock() ​

setClock(minutes, pace): void

Defined in: apps/client/src/renderer/game.ts:451

Asks the server to set the room clock to a time (minutes after midnight), a pace, or both (a debug command).

Parameters ​

minutes ​

number | undefined

pace ​

number | undefined

Returns ​

void


setColliders() ​

setColliders(on): void

Defined in: apps/client/src/renderer/game.ts:429

Draws the level's collision meshes as a wireframe over it, or hides them again.

Parameters ​

on ​

boolean

Returns ​

void


setFov() ​

setFov(scene, minimap): void

Defined in: apps/client/src/renderer/game.ts:427

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

Parameters ​

scene ​

boolean

minimap ​

boolean

Returns ​

void


setFullMap() ​

setFullMap(open): void

Defined in: apps/client/src/renderer/game.ts:415

Opens or closes the full map (the M key, a click on the minimap, Esc).

Parameters ​

open ​

boolean

Returns ​

void


setInvincible() ​

setInvincible(on): void

Defined in: apps/client/src/renderer/game.ts:439

Asks the server to make the player's character invincible, or mortal again.

Parameters ​

on ​

boolean

Returns ​

void


setMaxHealth() ​

setMaxHealth(health): void

Defined in: apps/client/src/renderer/game.ts:441

Gives the player's character its own full health (healed to it), or a player's again (0).

Parameters ​

health ​

number

Returns ​

void


setPaused() ​

setPaused(open): void

Defined in: apps/client/src/renderer/game.ts:421

Opens the pause menu (asking the room to wait) or closes it (Esc, the toolbar's button).

Parameters ​

open ​

boolean

Returns ​

void


setWanted() ​

setWanted(stars, heat?): void

Defined in: apps/client/src/renderer/game.ts:449

Asks the server to set the player's Wanted level to so many stars, at a Heat when one is given (a debug command; 0 clears it).

Parameters ​

stars ​

number

heat? ​

number

Returns ​

void


setWeather() ​

setWeather(request): void

Defined in: apps/client/src/renderer/game.ts:453

Asks the server for a weather: a kind at an intensity, its own way again, whether the dark hides (debug commands on).

Parameters ​

request ​

WeatherRequest

Returns ​

void


skipTime() ​

skipTime(hours): void

Defined in: apps/client/src/renderer/game.ts:455

Asks the server to skip the room clock so many hours on (debug commands on).

Parameters ​

hours ​

number

Returns ​

void


spawnChaser() ​

spawnChaser(request): void

Defined in: apps/client/src/renderer/game.ts:435

Asks the server for a chaser behind the player as the legend's panel says: a style, on foot or in a car with its tactics and crew, armed or not (a debug command the server honours while its debug commands are on).

Parameters ​

request ​

ChaserRequest

Returns ​

void


start() ​

start(): void

Defined in: apps/client/src/renderer/game.ts:409

Starts the render loop.

Returns ​

void


stop() ​

stop(): void

Defined in: apps/client/src/renderer/game.ts:411

Stops rendering and disconnects.

Returns ​

void


teleport() ​

teleport(road): void

Defined in: apps/client/src/renderer/game.ts:447

Asks the server to put the player on a road of the level, halfway along it in its right-hand lane and facing along it (a debug command, honoured while the server's debug commands are on): the quick way to a level's tunnel, its hills or its bridge.

Parameters ​

road ​

string

Returns ​

void


toggleHud() ​

toggleHud(): void

Defined in: apps/client/src/renderer/game.ts:423

Hides or shows the HUD (the H key and the overlay button).

Returns ​

void


toggleMusic() ​

toggleMusic(): void

Defined in: apps/client/src/renderer/game.ts:413

Starts or stops the music (the U key and the overlay button).

Returns ​

void