C# Класс GooglePlayGames.BasicApi.DummyClient

Наследование: IPlayGamesClient
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Authenticate ( string>.Action callback, bool silent ) : void

Starts the authentication process.

If silent == true, no UIs will be shown (if UIs are needed, it will fail rather than show them). If silent == false, this may show UIs, consent dialogs, etc. At the end of the process, callback will be invoked to notify of the result. Once the callback returns true, the user is considered to be authenticated forever after.

GetAccessToken ( ) : string

Returns an access token.

GetAchievement ( string achId ) : GooglePlayGames.BasicApi.Achievement

Returns the achievement corresponding to the passed achievement identifier.

GetApiClient ( ) : IntPtr

Gets the Android API client. Returns null on non-Android players.

GetEventsClient ( ) : GooglePlayGames.BasicApi.Events.IEventsClient

Gets the events client.

GetFriends ( ) : IUserProfile[]

Gets the friends.

GetIdToken ( Action idTokenCallback ) : void

Retrieves an id token, which can be verified server side, if they are logged in.

GetInvitationFromNotification ( ) : Invitation

Gets the invitation from notification.

GetPlayerStats ( PlayerStats>.Action callback ) : void

Gets the player stats.

GetQuestsClient ( ) : GooglePlayGames.BasicApi.Quests.IQuestsClient

Gets the quests client.

GetRtmpClient ( ) : IRealTimeMultiplayerClient

Returns a real-time multiplayer client.

GetSavedGameClient ( ) : SavedGame.ISavedGameClient

Gets the saved game client.

GetServerAuthCode ( string serverClientId, string>.Action callback ) : void

Asynchronously retrieves the server auth code for this client.

Note: This function is only implemented for Android.

GetTbmpClient ( ) : ITurnBasedMultiplayerClient

Returns a turn-based multiplayer client.

GetToken ( ) : string

Retrieves an OAuth 2.0 bearer token for the client.

GetUserDisplayName ( ) : string

Returns a human readable name for the user, if they are logged in.

GetUserEmail ( ) : string

Gets the user's email.

The email address returned is selected by the user from the accounts present on the device. There is no guarantee this uniquely identifies the player. For unique identification use the id property of the local player. The user can also choose to not select any email address, meaning it is not available.

GetUserEmail ( string>.Action callback ) : void

Gets the user's email with a callback.

The email address returned is selected by the user from the accounts present on the device. There is no guarantee this uniquely identifies the player. For unique identification use the id property of the local player. The user can also choose to not select any email address, meaning it is not available.

GetUserId ( ) : string

Returns the authenticated user's ID. Note that this value may change if a user signs on and signs in with a different account.

GetUserImageUrl ( ) : string

Returns the user's avatar url, if they are logged in and have an avatar.

HasInvitationFromNotification ( ) : bool

Determines whether this instance has invitation from notification.

IncrementAchievement ( string achId, int steps, Action callback ) : void

Increments the achievement.

IsAuthenticated ( ) : bool

Returns whether or not user is authenticated.

LeaderboardMaxResults ( ) : int

Returns the max number of scores returned per call.

LoadAchievements ( Action callback ) : void

Loads the achievements for the current player.

LoadFriends ( Action callback ) : void

Load friends of the authenticated user

LoadMoreScores ( GooglePlayGames.BasicApi.ScorePageToken token, int rowCount, Action callback ) : void

Loads the more scores for the leaderboard.

The token is accessed by calling LoadScores() with a positive row count.

LoadScores ( string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, Action callback ) : void

Loads the score data for the given leaderboard.

LoadUsers ( string userIds, Action callback ) : void

Loads the players specified.

This is mainly used by the leaderboard APIs to get the information of a high scorer.

RegisterInvitationDelegate ( InvitationReceivedDelegate invitationDelegate ) : void

Registers the invitation delegate.

RevealAchievement ( string achId, Action callback ) : void

Reveals the achievement.

SetStepsAtLeast ( string achId, int steps, Action callback ) : void

Set an achievement to have at least the given number of steps completed.

Calling this method while the achievement already has more steps than the provided value is a no-op. Once the achievement reaches the maximum number of steps, the achievement is automatically unlocked, and any further mutation operations are ignored.

ShowAchievementsUI ( Action callback ) : void

Shows the achievements UI

ShowLeaderboardUI ( string leaderboardId, LeaderboardTimeSpan span, Action callback ) : void

Shows the leaderboard UI

SignOut ( ) : void

Signs the user out.

SubmitScore ( string leaderboardId, long score, Action callback ) : void

Submits the score.

SubmitScore ( string leaderboardId, long score, string metadata, Action callback ) : void

Submits the score for the currently signed-in player to the leaderboard associated with a specific id and metadata (such as something the player did to earn the score).

UnlockAchievement ( string achId, Action callback ) : void

Unlocks the achievement.

Приватные методы

Метод Описание
LogUsage ( ) : void

Logs the usage.

Описание методов

Authenticate() публичный Метод

Starts the authentication process.
If silent == true, no UIs will be shown (if UIs are needed, it will fail rather than show them). If silent == false, this may show UIs, consent dialogs, etc. At the end of the process, callback will be invoked to notify of the result. Once the callback returns true, the user is considered to be authenticated forever after.
public Authenticate ( string>.Action callback, bool silent ) : void
callback string>.Action Callback when completed.
silent bool If set to true silent.
Результат void

GetAccessToken() публичный Метод

Returns an access token.
public GetAccessToken ( ) : string
Результат string

GetAchievement() публичный Метод

Returns the achievement corresponding to the passed achievement identifier.
public GetAchievement ( string achId ) : GooglePlayGames.BasicApi.Achievement
achId string Achievement identifier.
Результат GooglePlayGames.BasicApi.Achievement

GetApiClient() публичный Метод

Gets the Android API client. Returns null on non-Android players.
public GetApiClient ( ) : IntPtr
Результат System.IntPtr

GetEventsClient() публичный Метод

Gets the events client.
public GetEventsClient ( ) : GooglePlayGames.BasicApi.Events.IEventsClient
Результат GooglePlayGames.BasicApi.Events.IEventsClient

GetFriends() публичный Метод

Gets the friends.
public GetFriends ( ) : IUserProfile[]
Результат IUserProfile[]

GetIdToken() публичный Метод

Retrieves an id token, which can be verified server side, if they are logged in.
public GetIdToken ( Action idTokenCallback ) : void
idTokenCallback Action The callback invoked with the token
Результат void

GetInvitationFromNotification() публичный Метод

Gets the invitation from notification.
public GetInvitationFromNotification ( ) : Invitation
Результат GooglePlayGames.BasicApi.Multiplayer.Invitation

GetPlayerStats() публичный Метод

Gets the player stats.
public GetPlayerStats ( PlayerStats>.Action callback ) : void
callback PlayerStats>.Action Callback for response.
Результат void

GetQuestsClient() публичный Метод

Gets the quests client.
public GetQuestsClient ( ) : GooglePlayGames.BasicApi.Quests.IQuestsClient
Результат GooglePlayGames.BasicApi.Quests.IQuestsClient

GetRtmpClient() публичный Метод

Returns a real-time multiplayer client.
public GetRtmpClient ( ) : IRealTimeMultiplayerClient
Результат IRealTimeMultiplayerClient

GetSavedGameClient() публичный Метод

Gets the saved game client.
public GetSavedGameClient ( ) : SavedGame.ISavedGameClient
Результат SavedGame.ISavedGameClient

GetServerAuthCode() публичный Метод

Asynchronously retrieves the server auth code for this client.
Note: This function is only implemented for Android.
public GetServerAuthCode ( string serverClientId, string>.Action callback ) : void
serverClientId string The Client ID.
callback string>.Action Callback for response.
Результат void

GetTbmpClient() публичный Метод

Returns a turn-based multiplayer client.
public GetTbmpClient ( ) : ITurnBasedMultiplayerClient
Результат ITurnBasedMultiplayerClient

GetToken() публичный Метод

Retrieves an OAuth 2.0 bearer token for the client.
public GetToken ( ) : string
Результат string

GetUserDisplayName() публичный Метод

Returns a human readable name for the user, if they are logged in.
public GetUserDisplayName ( ) : string
Результат string

GetUserEmail() публичный Метод

Gets the user's email.
The email address returned is selected by the user from the accounts present on the device. There is no guarantee this uniquely identifies the player. For unique identification use the id property of the local player. The user can also choose to not select any email address, meaning it is not available.
public GetUserEmail ( ) : string
Результат string

GetUserEmail() публичный Метод

Gets the user's email with a callback.
The email address returned is selected by the user from the accounts present on the device. There is no guarantee this uniquely identifies the player. For unique identification use the id property of the local player. The user can also choose to not select any email address, meaning it is not available.
public GetUserEmail ( string>.Action callback ) : void
callback string>.Action The callback with a status code of the request, /// and string which is the email. It can be null.
Результат void

GetUserId() публичный Метод

Returns the authenticated user's ID. Note that this value may change if a user signs on and signs in with a different account.
public GetUserId ( ) : string
Результат string

GetUserImageUrl() публичный Метод

Returns the user's avatar url, if they are logged in and have an avatar.
public GetUserImageUrl ( ) : string
Результат string

HasInvitationFromNotification() публичный Метод

Determines whether this instance has invitation from notification.
public HasInvitationFromNotification ( ) : bool
Результат bool

IncrementAchievement() публичный Метод

Increments the achievement.
public IncrementAchievement ( string achId, int steps, Action callback ) : void
achId string Achievement identifier.
steps int Steps to increment by..
callback Action Callback to invoke when complete.
Результат void

IsAuthenticated() публичный Метод

Returns whether or not user is authenticated.
public IsAuthenticated ( ) : bool
Результат bool

LeaderboardMaxResults() публичный Метод

Returns the max number of scores returned per call.
public LeaderboardMaxResults ( ) : int
Результат int

LoadAchievements() публичный Метод

Loads the achievements for the current player.
public LoadAchievements ( Action callback ) : void
callback Action Callback to invoke when completed.
Результат void

LoadFriends() публичный Метод

Load friends of the authenticated user
public LoadFriends ( Action callback ) : void
callback Action Callback invoked when complete. bool argument /// indicates success.
Результат void

LoadMoreScores() публичный Метод

Loads the more scores for the leaderboard.
The token is accessed by calling LoadScores() with a positive row count.
public LoadMoreScores ( GooglePlayGames.BasicApi.ScorePageToken token, int rowCount, Action callback ) : void
token GooglePlayGames.BasicApi.ScorePageToken Token used to start loading scores.
rowCount int Max number of scores to return. /// This can be limited by the SDK.
callback Action Callback to invoke when complete.
Результат void

LoadScores() публичный Метод

Loads the score data for the given leaderboard.
public LoadScores ( string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, Action callback ) : void
leaderboardId string Leaderboard identifier.
start LeaderboardStart Start indicating the top scores or player centric
rowCount int Row count.
collection LeaderboardCollection Collection to display.
timeSpan LeaderboardTimeSpan Time span.
callback Action Callback to invoke when complete.
Результат void

LoadUsers() публичный Метод

Loads the players specified.
This is mainly used by the leaderboard APIs to get the information of a high scorer.
public LoadUsers ( string userIds, Action callback ) : void
userIds string User identifiers.
callback Action Callback to invoke when completed.
Результат void

RegisterInvitationDelegate() публичный Метод

Registers the invitation delegate.
public RegisterInvitationDelegate ( InvitationReceivedDelegate invitationDelegate ) : void
invitationDelegate InvitationReceivedDelegate Invitation delegate.
Результат void

RevealAchievement() публичный Метод

Reveals the achievement.
public RevealAchievement ( string achId, Action callback ) : void
achId string Achievement identifier.
callback Action Callback to invoke when complete.
Результат void

SetStepsAtLeast() публичный Метод

Set an achievement to have at least the given number of steps completed.
Calling this method while the achievement already has more steps than the provided value is a no-op. Once the achievement reaches the maximum number of steps, the achievement is automatically unlocked, and any further mutation operations are ignored.
public SetStepsAtLeast ( string achId, int steps, Action callback ) : void
achId string Achievement identifier.
steps int Steps to increment to at least.
callback Action Callback to invoke when complete.
Результат void

ShowAchievementsUI() публичный Метод

Shows the achievements UI
public ShowAchievementsUI ( Action callback ) : void
callback Action Callback to invoke when complete.
Результат void

ShowLeaderboardUI() публичный Метод

Shows the leaderboard UI
public ShowLeaderboardUI ( string leaderboardId, LeaderboardTimeSpan span, Action callback ) : void
leaderboardId string Leaderboard identifier.
span LeaderboardTimeSpan Timespan to display.
callback Action Callback to invoke when complete.
Результат void

SignOut() публичный Метод

Signs the user out.
public SignOut ( ) : void
Результат void

SubmitScore() публичный Метод

Submits the score.
public SubmitScore ( string leaderboardId, long score, Action callback ) : void
leaderboardId string Leaderboard identifier.
score long Score to submit.
callback Action Callback to invoke when complete.
Результат void

SubmitScore() публичный Метод

Submits the score for the currently signed-in player to the leaderboard associated with a specific id and metadata (such as something the player did to earn the score).
public SubmitScore ( string leaderboardId, long score, string metadata, Action callback ) : void
leaderboardId string Leaderboard identifier.
score long Score value to submit.
metadata string Metadata about the score.
callback Action Callback upon completion.
Результат void

UnlockAchievement() публичный Метод

Unlocks the achievement.
public UnlockAchievement ( string achId, Action callback ) : void
achId string Achievement identifier.
callback Action Callback to invoke when complete.
Результат void