Members
(readonly) aoiEntryPoint :Vec3D
The returned coordinates are those that the User had when thier presence in the Area of Interest of the current User was last notified by a SFSEvent.PROXIMITY_LIST_UPDATE event. This field is populated if the User joined a Room of type MMORoom only, and if the MMORoom is configured to receive such data from the server.
(readonly) id :number
The id is unique and it is generated by the server when the User logs in.
- number
(readonly) isAdmin :boolean
Administrator Users have this property set to the UserPrivileges.ADMINISTRATOR value.
- boolean
- See
(readonly) isGuest :boolean
Guest Users have this property set to the UserPrivileges.GUEST value.
- boolean
- See
(readonly) isItMe :boolean
- boolean
(readonly) isModerator :boolean
Moderator Users have this property set to the UserPrivileges.MODERATOR value.
- boolean
- See
(readonly) isPlayer :boolean
Non-Game Rooms always return false
If the User is inside multiple Game Rooms at the same time, use the SFSUser#isPlayerInRoom method instead.
- boolean
(readonly) isSpectator :boolean
Non-Game Rooms always return false
If the User is inside multiple Game Rooms at the same time, use the SFSUser#isPlayerInRoom method instead.
- boolean
(readonly) isStandardUser :boolean
Standard Users have this property set to the UserPrivileges.STANDARD value.
- boolean
- See
(readonly) name :string
Two Users in the same Zone cannot have the same name.
- string
(readonly) playerId :number
This property differs from SFSUser#id property and it is used to indicate which Player number is assigned to a User inside a Game Room. For example, in a Game Room for 5 players, the first client joining it will have its Player id equal to 1, the second will have it equal to 2 and so forth. When a User leaves the Room, the Player slot is freed up and the next User joining the Room will take it.
This property applies to Game Rooms only; in standard Rooms it is always 0. Also, in Game Rooms a Player id value lower than 0 indicates that the User is a Spectator.
If the User is inside multiple Game Rooms at the same time, a different Player id value will be assigned to it in each Room. In this case this property returns the value corresponding to the last joined Room; in order to obtain the value for a specific Room, use the SFSRoom#getPlayerId method.
- number
- See
(readonly) privilegeId :number
- number
(readonly) userManager :SFSUserManager
Methods
containsVariable(varName) → {boolean}
| Name | Type | Description |
|---|---|---|
varName | string | The name of the User Variable whose existance must be checked. |
true if a User Variable with the passed name is found.- Type:
- boolean
getPlayerId(room) → {number}
See the SFSRoom#playerId property description for more information.
| Name | Type | Description |
|---|---|---|
room | SFSRoom | The object representing the Room to get the Player id from. |
- Type:
- number
getVariable(varName) → {SFSUserVariable}
| Name | Type | Description |
|---|---|---|
varName | string | The name of the User Variable to be retrieved. |
null if no User Variable with the passed name belongs to the User.- Type:
- SFSUserVariable
getVariables() → {Array.<SFSUserVariable>}
- Type:
- Array.<SFSUserVariable>
isJoinedInRoom(room) → {boolean}
| Name | Type | Description |
|---|---|---|
room | SFSRoom | The object representing the Room where to check the User presence. |
true if the User is inside the passed Room.- Type:
- boolean
isPlayerInRoom(room) → {boolean}
Non-Game Rooms always return false.
If a User can join one Game Room at a time only, use the SFSUser#isPlayer property.
| Name | Type | Description |
|---|---|---|
room | SFSRoom | The object representing the Room where to check if the User is a Player. |
true if the User is a Player in the passed Room.- Type:
- boolean
isSpectatorInRoom(room) → {boolean}
Non-Game Rooms always return false.
If a User can join one Game Room at a time only, use the SFSUser#isSpectator property.
| Name | Type | Description |
|---|---|---|
room | SFSRoom | The object representing the Room where to check if the User is a Spectator. |
true if the User is a Spectator in the passed Room.- Type:
- boolean
toString() → {string}
- Type:
- string