pub unsafe trait GKInviteEventListener {
// Provided methods
unsafe fn player_didAcceptInvite(
&self,
player: &GKPlayer,
invite: &GKInvite,
)
where Self: Sized + Message { ... }
unsafe fn player_didRequestMatchWithRecipients(
&self,
player: &GKPlayer,
recipient_players: &NSArray<GKPlayer>,
)
where Self: Sized + Message { ... }
unsafe fn player_didRequestMatchWithPlayers(
&self,
player: &GKPlayer,
player_i_ds_to_invite: &NSArray<NSString>,
)
where Self: Sized + Message { ... }
}Available on crate feature
GKMatchmaker only.Expand description
GKInviteEventListener uses the GKLocalPlayerListener mechanism on GKLocalPlayer to listen to the two kinds of invite events that a game must respond to
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn player_didAcceptInvite(&self, player: &GKPlayer, invite: &GKInvite)
Available on crate features GKBasePlayer and GKPlayer only.
unsafe fn player_didAcceptInvite(&self, player: &GKPlayer, invite: &GKInvite)
GKBasePlayer and GKPlayer only.player:didAcceptInvite: gets called when another player accepts the invite from the local player
Sourceunsafe fn player_didRequestMatchWithRecipients(
&self,
player: &GKPlayer,
recipient_players: &NSArray<GKPlayer>,
)
Available on crate features GKBasePlayer and GKPlayer only.
unsafe fn player_didRequestMatchWithRecipients( &self, player: &GKPlayer, recipient_players: &NSArray<GKPlayer>, )
GKBasePlayer and GKPlayer only.didRequestMatchWithRecipients: gets called when the player chooses to play with another player from Game Center and it launches the game to start matchmaking
Sourceunsafe fn player_didRequestMatchWithPlayers(
&self,
player: &GKPlayer,
player_i_ds_to_invite: &NSArray<NSString>,
)
👎DeprecatedAvailable on crate features GKBasePlayer and GKPlayer only.
unsafe fn player_didRequestMatchWithPlayers( &self, player: &GKPlayer, player_i_ds_to_invite: &NSArray<NSString>, )
GKBasePlayer and GKPlayer only.- This method is obsolete. It will never be invoked and its implementation does nothing**