JoinRoomInvitationRequest Class |
Namespace: Sfs2X.Requests.Game
public class JoinRoomInvitationRequest : BaseRequest
Name | Description | |
---|---|---|
JoinRoomInvitationRequest(Room, ListString) |
See JoinRoomInvitationRequest(Room, List<string>, ISFSObject, int, bool) constructor.
| |
JoinRoomInvitationRequest(Room, ListString, ISFSObject) |
See JoinRoomInvitationRequest(Room, List<string>, ISFSObject, int, bool) constructor.
| |
JoinRoomInvitationRequest(Room, ListString, ISFSObject, Int32) |
See JoinRoomInvitationRequest(Room, List<string>, ISFSObject, int, bool) constructor.
| |
JoinRoomInvitationRequest(Room, ListString, ISFSObject, Int32, Boolean) |
Creates a new JoinRoomInvitationRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.USER_ENTER_ROOM, onUserJoin); List<string> invitedUsers = new List<string>(){"Fozzie", "Piggy"}; Room room = sfs.GetRoomByName("The Garden"); // Add message to be shown to the invited users ISFSObject params = SFSObject.NewInstance(); params.PutUtfString("msg", "You are invited in this Room: " + room.Name); // Send the request sfs.Send( new JoinRoomInvitationRequest(room, invitedUsers, params) ); } void onUserJoin(BaseEvent evt) { User user = (User)evt.Params["user"]; Console.WriteLine("Room joined by: " + user.Name); // .Net / Unity System.Diagnostics.Debug.WriteLine("Room joined by: " + user.Name); // UWP }