new RoomInfo(name)
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Room name. |
- Source:
- Photon-Javascript_SDK.js, line 1117
Members
-
<readonly> address :string
Joined room Game server address.
-
- Source:
- Photon-Javascript_SDK.js, line 1132
-
<readonly> emptyRoomLiveTime :number
Time in ms indicating how long the room instance will be keeped alive in the server room cache after all clients have left the room.
-
- Source:
- Photon-Javascript_SDK.js, line 1167
-
<readonly> expectedUsers :number
Expected users.
-
- Source:
- Photon-Javascript_SDK.js, line 1181
-
<readonly> isOpen :boolean
Defines if this room can be joined.
-
- Source:
- Photon-Javascript_SDK.js, line 1153
-
<readonly> isVisible :boolean
Shows the room in the lobby's room list. Makes sense only for local room.
-
- Source:
- Photon-Javascript_SDK.js, line 1146
-
<readonly> masterClientId :number
Master client set by game server. Note: Not all servers support this currently. If the value of the property is 0, use lowest actorid instead.
-
- Source:
- Photon-Javascript_SDK.js, line 1204
-
<readonly> maxPlayers :number
Max players before room is considered full.
-
- Source:
- Photon-Javascript_SDK.js, line 1139
-
<readonly> name :string
Room name.
-
- Source:
- Photon-Javascript_SDK.js, line 1125
-
<readonly> playerCount :number
Count of player currently in room.
-
- Source:
- Photon-Javascript_SDK.js, line 1160
-
<readonly> plugins :string[]
Expected server plugins.
-
- Source:
- Photon-Javascript_SDK.js, line 1188
-
<readonly> removed :boolean
Room removed (in room list updates).
-
- Source:
- Photon-Javascript_SDK.js, line 1195
-
<readonly> suspendedPlayerLiveTime :number
Time in ms indicating how long suspended player will be kept in the room.
-
- Source:
- Photon-Javascript_SDK.js, line 1174
Methods
-
getCustomProperties() → {object}
Returns custom properties.
-
- Source:
- Photon-Javascript_SDK.js, line 1216
Returns:
Custom properties.- Type
- object
-
getCustomProperty(name) → {object}
Returns custom property by name.
-
Parameters:
Name Type Description namestring Name of the property. - Source:
- Photon-Javascript_SDK.js, line 1248
Returns:
Property or undefined if property not found.- Type
- object
-
getCustomPropertyOrElse(name, defaultValue) → {object}
Returns custom property by name or default value.
-
Parameters:
Name Type Description namestring Name of the property. defaultValueobject Default property value. - Source:
- Photon-Javascript_SDK.js, line 1255
Returns:
Property or default value if property not found.- Type
- object
-
getPropsListedInLobby() → {object}
Returns properties listed in lobby.
-
- Source:
- Photon-Javascript_SDK.js, line 1228
Returns:
Properties listed in lobby.- Type
- object
-
onPropertiesChange(changedCustomProps, byClient)
Called on every room properties update: room creation, properties set by client, poperties update from server. Override to update custom room state.
-
Parameters:
Name Type Argument Description changedCustomPropsobject Key-value map of changed properties. byClientboolean <optional>
true if called on room creation or properties set by client. - Source:
- Photon-Javascript_SDK.js, line 1240