JoinRoomRequest Class |
Namespace: Sfs2X.Requests
public class JoinRoomRequest : BaseRequest
Name | Description | |
---|---|---|
JoinRoomRequest(Object) |
See JoinRoomRequest(object, string, int?, bool) constructor.
| |
JoinRoomRequest(Object, String) |
See JoinRoomRequest(object, string, int?, bool) constructor.
| |
JoinRoomRequest(Object, String, NullableInt32) |
See JoinRoomRequest(object, string, int?, bool) constructor.
| |
JoinRoomRequest(Object, String, NullableInt32, Boolean) |
Creates a new JoinRoomRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.ROOM_JOIN, OnJoinRoom); sfs.AddEventListener(SFSEvent.ROOM_JOIN_ERROR, OnJoinRoomError); // Join a Room called "Lobby" sfs.Send( new JoinRoomRequest("Lobby") ); } void OnJoinRoom(BaseEvent evt) { Console.WriteLine("Room joined successfully: " + (Room)evt.Params["room"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Room joined successfully: " + (Room)evt.Params["room"]); // UWP } void OnJoinRoomError(BaseEvent evt) { Console.WriteLine("Room joining failed: " + (string)evt.Params["errorMessage"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Room joining failed: " + (string)evt.Params["errorMessage"]); // UWP }