![]() |
Murl Engine API
Version 2018.3
|
The IGameCenterControl interface. More...
#include <murl_i_game_center_control.h>
The IGameCenterControl interface.
The game center is currently supported on iOS/OSX/tvOS only.
Authentication | |
enum | AuthenticationStatus { STATUS_AUTHENTICATION_IDLE, STATUS_AUTHENTICATING, STATUS_AUTHENTICATED, STATUS_AUTHENTICATION_FAILED, STATUS_AUTHENTICATION_IMPOSSIBLE } |
Enumeration of the authentication status. More... | |
virtual AuthenticationStatus | GetAuthenticationStatus () const =0 |
Get the game-center authentication status. More... | |
virtual Bool | AuthenticateLocalPlayer ()=0 |
Start authenticating the local user to the game-center. More... | |
virtual const IGameCenterPlayer & | GetLocalPlayer () const =0 |
Get the game-center local user. More... | |
virtual Bool | IsLocalPlayerUnderage () const =0 |
Check if the game-center local user is underage. More... | |
virtual Bool | IsAuthenticationIdle () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IDLE. More... | |
virtual Bool | IsAuthenticating () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATING. More... | |
virtual Bool | IsAuthenticated () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATED. More... | |
virtual Bool | IsAuthenticationFailed () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_FAILED. More... | |
virtual Bool | IsAuthenticationImpossible () const =0 |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IMPOSSIBLE. More... | |
Friends | |
enum | LoadFriendsStatus { STATUS_LOAD_FRIENDS_IDLE, STATUS_LOAD_FRIENDS_LOADING } |
Enumeration of the load friends status. More... | |
virtual LoadFriendsStatus | GetLoadFriendsStatus () const =0 |
Get the game-center load friends status. More... | |
virtual Bool | LoadFriends ()=0 |
Load all game-center friends player entries. More... | |
virtual Bool | LoadFriends (const StringArray &friendIds)=0 |
Load specified game-center friends player entries. More... | |
virtual const GameCenterPlayerEntries & | GetFriends () const =0 |
Get an array of friends player entries. More... | |
virtual Bool | IsLoadFriendsIdle () const =0 |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE. More... | |
virtual Bool | IsLoadFriendsLoading () const =0 |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING. More... | |
Leaderboard | |
enum | LeaderboardStatus { STATUS_LEADERBOARD_IDLE, STATUS_LEADERBOARD_SHOWING, STATUS_LEADERBOARD_REPORTING, STATUS_LEADERBOARD_LOADING } |
Enumeration of the leaderboard status. More... | |
virtual LeaderboardStatus | GetLeaderboardStatus () const =0 |
Get the game-center leaderboard status. More... | |
virtual Bool | ShowLeaderboard (const String &category)=0 |
Show the game-center leaderboard overlay. More... | |
virtual Bool | ReportLeaderboard (const String &category, UInt64 score)=0 |
Report a score to the game-center leaderboard. More... | |
virtual Bool | LoadLeaderboard (const String &category, UInt32 startRank, UInt32 numberOfRanks)=0 |
Load the game-center leaderboard entries. More... | |
virtual const GameCenterLeaderboardEntries & | GetLeaderboard () const =0 |
Get an array of leaderboard entries. More... | |
virtual Bool | IsLeaderboardIdle () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_IDLE. More... | |
virtual Bool | IsLeaderboardShowing () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_SHOWING. More... | |
virtual Bool | IsLeaderboardReporting () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_REPORTING. More... | |
virtual Bool | IsLeaderboardLoading () const =0 |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_LOADING. More... | |
Achievements | |
enum | AchievementStatus { STATUS_ACHIEVEMENT_IDLE, STATUS_ACHIEVEMENT_SHOWING, STATUS_ACHIEVEMENT_REPORTING, STATUS_ACHIEVEMENT_RESETTING, STATUS_ACHIEVEMENT_LOADING } |
Enumeration of the achievement status. More... | |
virtual AchievementStatus | GetAchievementStatus () const =0 |
Get the game-center achievement status. More... | |
virtual Bool | ShowAchievements ()=0 |
Show the game-center achievements overlay. More... | |
virtual Bool | ReportAchievement (const String &identifier, Double percentComplete, Bool showsCompletionBanner=true)=0 |
Report a game-center achievement. More... | |
virtual Bool | ResetAchievements ()=0 |
Reset all game-center achievements. More... | |
virtual Bool | LoadAchievements ()=0 |
Load the game-center achievement entries. More... | |
virtual const GameCenterAchievementEntries & | GetAchievements () const =0 |
Get an array of achievement entries. More... | |
virtual Bool | IsAchievementIdle () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_IDLE. More... | |
virtual Bool | IsAchievementShowing () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING. More... | |
virtual Bool | IsAchievementReporting () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_REPOTRING. More... | |
virtual Bool | IsAchievementResetting () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING. More... | |
virtual Bool | IsAchievementLoading () const =0 |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_LOADING. More... | |
Errors | |
enum | Error { ERROR_NONE, ERROR_UNKNOWN, ERROR_CANCELLED, ERROR_COMMUNICATIONS_FAILURE, ERROR_USER_DENIED, ERROR_INVALID_CREDENTIALS, ERROR_NOT_AUTHENTICATED, ERROR_AUTHENTICATION_IN_PROGRESS, ERROR_INVALID_PLAYER, ERROR_SCORE_NOT_SET, ERROR_PARENTAL_CONTROLS_BLOCKED, ERROR_PLAYER_STATUS_EXCEEDS_MAXIMUM_LENGTH, ERROR_PLAYER_STATUS_INVALID, ERROR_MATCH_REQUEST_INVALID, ERROR_UNDERAGE, ERROR_GAME_UNRECOGNIZED, ERROR_NOT_SUPPORTED, ERROR_INVALID_PARAMETER } |
Enumeration of error status. More... | |
virtual Error | GetError () const =0 |
Get the game-center error status. More... | |
virtual Bool | ClearLastError ()=0 |
Clear the last error status. More... | |
Additional Inherited Members | |
![]() | |
virtual const String & | GetName () const =0 |
Get the controlable's name. More... | |
virtual void | FrameUpdate ()=0 |
Is executed in the platform thread context each frame tick. | |
virtual void | LogicUpdate ()=0 |
Is executed in the logic thread context each logic tick. | |
virtual void | ConfigChanged (const IAppConfiguration *appConfig)=0 |
Notification of changed configuration. More... | |
Enumeration of the authentication status.
Use GetAuthenticationStatus() to get the current status.
Enumeration of the load friends status.
Use GetLoadFriendsStatus() to get the current status.
Enumerator | |
---|---|
STATUS_LOAD_FRIENDS_IDLE | Loading friends is idle. |
STATUS_LOAD_FRIENDS_LOADING | Loading friends is in progress. |
Enumeration of the leaderboard status.
Use GetLeaderboardStatus() to get the current status.
Enumeration of the achievement status.
Use GetAchievementStatus() to get the current status.
Enumeration of error status.
Use GetError() to get the current status.
|
pure virtual |
Get the game-center authentication status.
Authentication operation works asynchronously, the application can check the current status to operate correctly.
|
pure virtual |
Start authenticating the local user to the game-center.
When starting the authentication, the authentication status changes to IGameCenterControl::STATUS_AUTHENTICATING immediately. When the authentication is finished the authentication status changes to IGameCenterControl::STATUS_AUTHENTICATED.
|
pure virtual |
Get the game-center local user.
The local user is available when AuthenticateLocalPlayer() is finished.
|
pure virtual |
Check if the game-center local user is underage.
The local user underage is available when AuthenticateLocalPlayer() is finished.
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IDLE.
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATING.
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATED.
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_FAILED.
|
pure virtual |
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IMPOSSIBLE.
|
pure virtual |
Get the game-center load friends status.
Load friends operation works asynchronously, the application can check the current status to operate correctly.
|
pure virtual |
Load all game-center friends player entries.
When start loading, the load friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING immediately. When the friends loading is finished the friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE. The friends player entries can be accessed by GetFriends().
|
pure virtual |
Load specified game-center friends player entries.
When start loading, the load friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING immediately. When the friends loading is finished the friends status changes to IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE. The friends player entries can be accessed by GetFriends().
friendIds | A string array containing the player identifiers to load. |
|
pure virtual |
Get an array of friends player entries.
The friends player entries are available when LoadFriends() is finished.
|
pure virtual |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE.
|
pure virtual |
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING.
|
pure virtual |
Get the game-center leaderboard status.
Leaderboard operation works asynchronously, the application can check the current status to operate correctly.
Show the game-center leaderboard overlay.
When showing the leaderboard overlay, the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_SHOWING immediately. When the leaderboard overlay is closed the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_IDLE.
category | The name of the leaderboard category to show or an empty string to show the default leaderboard. |
|
pure virtual |
Report a score to the game-center leaderboard.
When start reporting, the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_REPORTING immediately. When the leaderboard reporting is finished the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_IDLE.
category | The name of the leaderboard category. |
score | The score to report. |
|
pure virtual |
Load the game-center leaderboard entries.
When start loading, the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_LOADING immediately. When the leaderboard loading is finished the leaderboard status changes to IGameCenterControl::STATUS_LEADERBOARD_IDLE. The leaderboard entries can be accessed by GetLeaderboard() and GetLeaderboardCategory().
category | The name of the leaderboard category. |
startRank | The first rank to load. |
numberOfRanks | The number of ranks to load. |
|
pure virtual |
Get an array of leaderboard entries.
The leaderboard entries are available when LoadLeaderboard() is finished.
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_IDLE.
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_SHOWING.
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_REPORTING.
|
pure virtual |
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_LOADING.
|
pure virtual |
Get the game-center achievement status.
Achievement operation works asynchronously, the application can check the current status to operate correctly.
|
pure virtual |
Show the game-center achievements overlay.
When showing the achievements overlay, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING immediately. When the achievements overlay is closed the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
|
pure virtual |
Report a game-center achievement.
When start reporting, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_REPORTING immediately. When the achievement reporting is finished the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
identifier | The achievement identifier. |
percentComplete | The percentage of achievement complete, report 0 to unhide achievement. |
showsCompletionBanner | If true, a banner will be momentarily displayed after reporting a completed achievement. |
|
pure virtual |
Reset all game-center achievements.
When start resetting, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING immediately. When the achievement resetting is finished the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
|
pure virtual |
Load the game-center achievement entries.
When start loading, the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_LOADING immediately. When the achievement loading is finished the achievement status changes to IGameCenterControl::STATUS_ACHIEVEMENT_IDLE. The achievement entries can be accessed by GetAchievements().
|
pure virtual |
Get an array of achievement entries.
The achievements entries are available when LoadAchievements() is finished.
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING.
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_REPOTRING.
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING.
|
pure virtual |
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_LOADING.
|
pure virtual |
Get the game-center error status.
|
pure virtual |
Clear the last error status.
Set the error status to IGameCenterControl::ERROR_NONE.