isRoomKind
isRoomKind(
world,kind):boolean
Whether the room was opened as the kind kind of the game’s room
settings, such as room.kinds.island: a hub’s scene and an island’s
share one scene, and each reads which it is. False where the game
declares one kind, on a page, and in the game’s start, which runs
before the room knows its kind: read it from the first step on, as
every join hook and system does.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
kind |
RoomKindSettings |
Returns
Section titled “Returns”boolean
Example
Section titled “Example”if (isRoomKind(world, room.kinds!.plaza)) spawnPortals(step);