QuickJoinGameRequest Class |
Namespace: Sfs2X.Requests.Game
public class QuickJoinGameRequest : BaseRequest
Name | Description | |
---|---|---|
QuickJoinGameRequest(MatchExpression, ListRoom) |
See QuickJoinGameRequest(MatchExpression, List<Room>, Room) constructor.
| |
QuickJoinGameRequest(MatchExpression, ListString) |
See QuickJoinGameRequest(MatchExpression, List<string>, Room) constructor.
| |
QuickJoinGameRequest(MatchExpression, ListRoom, Room) |
Creates a new QuickJoinGameRequest instance.
| |
QuickJoinGameRequest(MatchExpression, ListString, Room) |
Creates a new QuickJoinGameRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.ROOM_JOIN, onRoomJoin); // Create a matching expression to find a Darts game with a "maxBet" variable less than 100 MatchExpression exp = new MatchExpression("type", StringMatch.EQUALS, "Darts").And("maxBet", NumberMatch.LESS_THAN, 100); // Search and join a public game within the "games" Group, leaving the last joined Room sfs.Send( new QuickJoinGameRequest(exp, new List<string>(){"games"}, sfs.LastJoinedRoom) ); } void OnRoomJoin(BaseEvent evt) { Console.WriteLine("Successfully joined Room: " + (Room)evt.Params["room"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Successfully joined Room: " + (Room)evt.Params["room"]); // UWP }