pub unsafe trait GKChallengeListener: NSObjectProtocol {
// Provided methods
unsafe fn player_wantsToPlayChallenge(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
)
where Self: Sized + Message { ... }
unsafe fn player_didReceiveChallenge(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
)
where Self: Sized + Message { ... }
unsafe fn player_didCompleteChallenge_issuedByFriend(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
friend_player: &GKPlayer,
)
where Self: Sized + Message { ... }
unsafe fn player_issuedChallengeWasCompleted_byFriend(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
friend_player: &GKPlayer,
)
where Self: Sized + Message { ... }
}GKEventListener only.Expand description
Provided Methods§
Sourceunsafe fn player_wantsToPlayChallenge(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
)
👎DeprecatedAvailable on crate features GKBasePlayer and GKChallenge and GKPlayer only.
unsafe fn player_wantsToPlayChallenge( &self, player: &GKPlayer, challenge: &GKChallenge, )
GKBasePlayer and GKChallenge and GKPlayer only.Called when a player starts the game with the intent of playing a challenge, or intends to play a challenge after selecting it within the in-game Game Center UI. player: The player who selected the challenge challenge: The challenge which was selected
Sourceunsafe fn player_didReceiveChallenge(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
)
👎DeprecatedAvailable on crate features GKBasePlayer and GKChallenge and GKPlayer only.
unsafe fn player_didReceiveChallenge( &self, player: &GKPlayer, challenge: &GKChallenge, )
GKBasePlayer and GKChallenge and GKPlayer only.Called when a player has received a challenge, triggered by a push notification from the server. Received only while the game is running. player: The player who received the challenge challenge: The challenge which was received
Sourceunsafe fn player_didCompleteChallenge_issuedByFriend(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
friend_player: &GKPlayer,
)
👎DeprecatedAvailable on crate features GKBasePlayer and GKChallenge and GKPlayer only.
unsafe fn player_didCompleteChallenge_issuedByFriend( &self, player: &GKPlayer, challenge: &GKChallenge, friend_player: &GKPlayer, )
GKBasePlayer and GKChallenge and GKPlayer only.Called when a player has completed a challenge, triggered while the game is running, or when the user has tapped a challenge notification banner while outside of the game. player: The player who completed the challenge challenge: The challenge which the player completed friendPlayer: The friend who sent the challenge originally
Sourceunsafe fn player_issuedChallengeWasCompleted_byFriend(
&self,
player: &GKPlayer,
challenge: &GKChallenge,
friend_player: &GKPlayer,
)
👎DeprecatedAvailable on crate features GKBasePlayer and GKChallenge and GKPlayer only.
unsafe fn player_issuedChallengeWasCompleted_byFriend( &self, player: &GKPlayer, challenge: &GKChallenge, friend_player: &GKPlayer, )
GKBasePlayer and GKChallenge and GKPlayer only.Called when a player’s friend has completed a challenge which the player sent to that friend. Triggered while the game is running, or when the user has tapped a challenge notification banner while outside of the game. player: The player who sent the challenge originally challenge: The challenge which the player created and sent friendPlayer: The friend who completed the challenge