InvitationReplyRequest Class |
Namespace: Sfs2X.Requests.Game
public class InvitationReplyRequest : BaseRequest
Name | Description | |
---|---|---|
InvitationReplyRequest(Invitation, InvitationReply) |
See InvitationReplyRequest(Invitation, InvitationReply, ISFSObject) constructor.
| |
InvitationReplyRequest(Invitation, InvitationReply, ISFSObject) |
Creates a new InvitationReplyRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.INVITATION, OnInvitationReceived); sfs.AddEventListener(SFSEvent.INVITATION_REPLY_ERROR, OnInvitationReplyError); } void OnInvitationReceived(BaseEvent evt) { // Let's accept this invitation sfs.Send( new InvitationReplyRequest((Invitation)evt.Params["invitation"], InvitationReply.ACCEPT) ); } void OnInvitationReplyError(BaseEvent evt) { Console.WriteLine("Failed to reply to invitation due to the following problem: " + (string)evt.Params["errorMessage"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Failed to reply to invitation due to the following problem: " + (string)evt.Params["errorMessage"]); // UWP }