Skip to content

KcdMp.mock.playerCursor

Fires the player-cursor handlers as if the player had brought up - or taken away - their cursor.

Runs the handlers registered with KcdMp.onPlayerCursor with shown, as the game does when the player’s cursor key brings the cursor up or takes it away; a handler registered later is told the same state. shown is true unless it says false.

KcdMp.mock.playerCursor(shown?)
Parameter Type
shown boolean true for the cursor up (the default), false for it gone (optional)

nothing

KcdMp.onPlayerCursor((shown) => console.log("cursor", shown));
if (KcdMp.env.mock) {
KcdMp.mock.playerCursor(); // up
KcdMp.mock.playerCursor(false); // gone
}

KcdMp.onPlayerCursor · KcdMp.mock.key · the Mock mode group of the index