Skip to content

BeforePause beta ​

Interface of @v12-engine/engine

ts
export interface BeforePause

A player asks for a pause (see askPause): how many they have left before this one (left), and how long it lasts at most (seconds, which can be changed); call it off with a reason

Members ​

cancel ​

ts
cancel(reason?: MessageRef): void;

Stops it. The reason is what the player is told, where this hook tells them (reason)

cancelled ​

ts
cancelled: boolean;

Whether a handler has called it off; set by cancel()

left ​

ts
readonly left: number;

How many pauses the player has left before this one

player ​

ts
readonly player: PlayerId;

The player asking for the pause

reason ​

ts
reason?: MessageRef;

What the player is told of why the pause was refused

seconds ​

ts
seconds: number;

How long the pause lasts at most, in seconds; a handler may change it