new Room(name)
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Room name. |
- Source:
- Photon-Javascript_SDK.js, line 1314
Mixes In
Methods
-
clearExpectedUsers()
Attempts to remove all current expected users from the server's Slot Reservation list. Note that this operation can conflict with new/other users joining. They might be adding users to the list of expected users before or after this client called ClearExpectedUsers. This room's expectedUsers value will update, when the server sends a successful update. Internals: This methods wraps up setting the ExpectedUsers property of a room.
-
- Source:
- Photon-Javascript_SDK.js, line 1460
-
setCustomProperties(properties, webForward, expectedProperties)
Sets custom property
-
Parameters:
Name Type Argument Default Description propertiesobject Table of properties to set. webForwardboolean <optional>
false Forward to web hook. expectedPropertiesobject <optional>
Table of properties expected when update occurs. (CAS : "Check And Swap") - Source:
- Photon-Javascript_SDK.js, line 1348
-
setCustomProperty(name, value, webForward, expectedValue)
Sets custom property
-
Parameters:
Name Type Argument Default Description namestring Name of the property. valueobject Property value. webForwardboolean <optional>
false Forward to web hook. expectedValueobject <optional>
Property value expected when update occurs. (CAS : "Check And Swap") - Source:
- Photon-Javascript_SDK.js, line 1325
-
setEmptyRoomLiveTime(emptyRoomLiveTime)
Sets room live time in the server room cache after all clients have left the room.
-
Parameters:
Name Type Description emptyRoomLiveTimenumber New live time value in ms. - Source:
- Photon-Javascript_SDK.js, line 1413
-
setIsOpen(isOpen)
Sets if this room can be joined.
-
Parameters:
Name Type Description isOpenboolean New property value. - Source:
- Photon-Javascript_SDK.js, line 1391
-
setIsVisible(isVisible)
Sets rooms visibility in the lobby's room list.
-
Parameters:
Name Type Description isVisibleboolean New visibility value. - Source:
- Photon-Javascript_SDK.js, line 1380
-
setMasterClient(actorNr)
Asks the server to assign another player as Master Client of your current room. This method calls an operation on the server to set a new Master Client, which takes a roundtrip. In case of success, this client and the others get the new Master Client from the server.
-
Parameters:
Name Type Description actorNrnumber New Master Client actor ID. - Source:
- Photon-Javascript_SDK.js, line 1473
-
setMaxPlayers(maxPlayers)
Sets max players before room is considered full.
-
Parameters:
Name Type Description maxPlayersnumber New max players value. - Source:
- Photon-Javascript_SDK.js, line 1402
-
setPlugins(plugins)
Sets expected server plugins.
-
Parameters:
Name Type Description pluginsstring[] New plugins list. - Source:
- Photon-Javascript_SDK.js, line 1435
-
setPropsListedInLobby(props)
Sets list of the room properties to pass to the RoomInfo list in a lobby.
-
Parameters:
Name Type Description propsstring[] Array of properties names. - Source:
- Photon-Javascript_SDK.js, line 1443
-
setPropsListedInLobby(props)
Sets list of the room properties to pass to the RoomInfo list in a lobby.
-
Parameters:
Name Type Description propsstring[] Array of properties names. - Source:
- Photon-Javascript_SDK.js, line 1451
-
setSuspendedPlayerLiveTime(suspendedPlayerLiveTime)
Sets time in ms indicating how long suspended player will be kept in the room.
-
Parameters:
Name Type Description suspendedPlayerLiveTimenumber New live time value in ms. - Source:
- Photon-Javascript_SDK.js, line 1424