#import <SFSRoom.h>
Inherits NSObject, and <Room>.
Inherited by MMORoom.
|
(id< Room >) | + fromSFSArray: |
|
|
NSInteger | _id |
|
NSString * | _name |
|
NSString * | _groupId |
|
BOOL | _isGame |
|
BOOL | _isHidden |
|
BOOL | _isJoined |
|
BOOL | _isPasswordProtected |
|
BOOL | _isManaged |
|
NSMutableDictionary * | _variables |
|
NSDictionary * | _properties |
|
id< IUserManager > | _userManager |
|
NSInteger | _maxUsers |
|
NSInteger | _maxSpectators |
|
NSInteger | _userCount |
|
NSInteger | _spectatorCount |
|
__weak id< IRoomManager > | _roomManager |
|
The Room object that represents a server Room.
The client API doesn't know about all Rooms on the server side but only about those that are joined and those in the Room Groups that were subscribed.
Subscribing to one or more Groups allows the client to listen for Room events in specific "areas" of the Zone without having to know and download details for all Rooms available.
The RoomList is created after a succesful login in the SmartFox2XClient roomList object and it is kept updated at all times by the Server.
- See also
- [SmartFox2XClient roomList]
-
CreateRoomRequest
-
JoinRoomRequest
-
SubscribeRoomGroupRequest
-
UnsubscribeRoomGroupRequest
-
ChangeRoomNameRequest
-
ChangeRoomPasswordStateRequest
-
ChangeRoomCapacityRequest
◆ containsUser:
- (BOOL) containsUser: |
|
(id <User>) |
user |
|
Checks if a User is joined in this Room
- Returns
- true if the User exists in the Room
◆ containsVariable:
- (BOOL) containsVariable: |
|
(NSString *) |
name |
|
◆ getUserById:
- (id< User >) getUserById: |
|
(NSInteger) |
id |
|
Get a User from its ID
- Returns
- the User, or null if no User with that ID exists in the Room
◆ getUserByName:
- (id< User >) getUserByName: |
|
(NSString *) |
name |
|
Get a User from its name
- Returns
- the User, or null if no User with that name exists in the Room
◆ getVariable:
- (id< RoomVariable >) getVariable: |
|
(NSString *) |
name |
|
Get a Room Variable
- Parameters
-
name | the name of the variable |
- Returns
- the Room Variable, or null if no variable exists with that name
◆ getVariables
- (NSArray *) getVariables |
|
|
|
Returns all the Room Variables
- Returns
- an array of Room Variables
◆ capacity
Returns the max amount of users (both Users and Spectators) that can be contained in this room
◆ groupId
The Room Group. Each Room is assigned to its Group. By default SmartFoxServer uses one single group called default
◆ id
The unique id of the Room
◆ isGame
◆ isHidden
Determines if the Room is hidden
◆ isJoined
Returns true if the Room is joined by the current User
◆ isPasswordProtected
- (BOOL) isPasswordProtected |
|
readwritenonatomicassign |
Returns true if the Room requires a password for joining it
◆ maxSpectators
- (NSInteger) maxSpectators |
|
readwritenonatomicassign |
Get the maximum number of spectators allowed in the Room
◆ maxUsers
Get the maximum number of users allowed for this Room
◆ name
◆ playerList
Returns all the Users that are players in this Room (must be Game Room)
◆ properties
- (NSDictionary *) properties |
|
readwritenonatomicstrong |
The properties object can be used to store any custom value/object to the Room at runtime
◆ spectatorCount
- (NSInteger) spectatorCount |
|
readwritenonatomicassign |
Get the number of spectators (only for Game Rooms)
◆ spectatorList
- (NSArray *) spectatorList |
|
readnonatomicweak |
Returns all the Users that are spectators in this Room (must be Game Room)
◆ userCount
Get the current number of users
◆ userList
Get the full list of users in the Room