![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IGameCenterControl interface.
The game center is currently supported on iOS/OSX/tvOS only.
Enumeration of the authentication status. Use GetAuthenticationStatus() to get the current status.
Murl.IGameCenterControl.STATUS_AUTHENTICATION_IDLE | The authentication is idle. |
Murl.IGameCenterControl.STATUS_AUTHENTICATING | The authentication is in progress. |
Murl.IGameCenterControl.STATUS_AUTHENTICATED | The authentication is succesful. |
Murl.IGameCenterControl.STATUS_AUTHENTICATION_FAILED | The authentication failed. |
Murl.IGameCenterControl.STATUS_AUTHENTICATION_IMPOSSIBLE | The authentication is not possible. |
Enumeration of the load friends status. Use GetLoadFriendsStatus() to get the current status.
Murl.IGameCenterControl.STATUS_LOAD_FRIENDS_IDLE | Loading friends is idle. |
Murl.IGameCenterControl.STATUS_LOAD_FRIENDS_LOADING | Loading friends is in progress. |
Enumeration of the leaderboard status. Use GetLeaderboardStatus() to get the current status.
Murl.IGameCenterControl.STATUS_LEADERBOARD_IDLE | The leaderboard is idle. |
Murl.IGameCenterControl.STATUS_LEADERBOARD_SHOWING | The leaderboard overlay is showing. |
Murl.IGameCenterControl.STATUS_LEADERBOARD_REPORTING | Reporting a leaderboard score is in progress. |
Murl.IGameCenterControl.STATUS_LEADERBOARD_LOADING | Loading leaderboard scores is in progress. |
Enumeration of the achievement status. Use GetAchievementStatus() to get the current status.
Murl.IGameCenterControl.STATUS_ACHIEVEMENT_IDLE | The achievement is idle. |
Murl.IGameCenterControl.STATUS_ACHIEVEMENT_SHOWING | The achievements overlay is showing. |
Murl.IGameCenterControl.STATUS_ACHIEVEMENT_REPORTING | Reporting achievements is in progress. |
Murl.IGameCenterControl.STATUS_ACHIEVEMENT_RESETTING | Resetting all achievements is in progress. |
Murl.IGameCenterControl.STATUS_ACHIEVEMENT_LOADING | Loading achievements is in progress. |
Enumeration of error status. Use GetError() to get the current status.
Murl.IGameCenterControl.ERROR_NONE | No error. |
Murl.IGameCenterControl.ERROR_UNKNOWN | Unknown error. |
Murl.IGameCenterControl.ERROR_CANCELLED | Action is cancelled. |
Murl.IGameCenterControl.ERROR_COMMUNICATIONS_FAILURE | Communication failed. |
Murl.IGameCenterControl.ERROR_USER_DENIED | User was denied. |
Murl.IGameCenterControl.ERROR_INVALID_CREDENTIALS | Invalid credentials. |
Murl.IGameCenterControl.ERROR_NOT_AUTHENTICATED | Not authenticated. |
Murl.IGameCenterControl.ERROR_AUTHENTICATION_IN_PROGRESS | Authentication is in progress. |
Murl.IGameCenterControl.ERROR_INVALID_PLAYER | Player identifier is invalid. |
Murl.IGameCenterControl.ERROR_SCORE_NOT_SET | Score was not set. |
Murl.IGameCenterControl.ERROR_PARENTAL_CONTROLS_BLOCKED | Parental control block. |
Murl.IGameCenterControl.ERROR_PLAYER_STATUS_EXCEEDS_MAXIMUM_LENGTH | Player status exceeds maximum length. |
Murl.IGameCenterControl.ERROR_PLAYER_STATUS_INVALID | Player status is invalid. |
Murl.IGameCenterControl.ERROR_MATCH_REQUEST_INVALID | Match request is invalid. |
Murl.IGameCenterControl.ERROR_UNDERAGE | Player is underage. |
Murl.IGameCenterControl.ERROR_GAME_UNRECOGNIZED | Game is not recognized. |
Murl.IGameCenterControl.ERROR_NOT_SUPPORTED | Not supported. |
Murl.IGameCenterControl.ERROR_INVALID_PARAMETER | Invalid parameter. |
Get the game-center authentication status. Authentication operation works asynchronously, the application can check the current status to operate correctly.
Murl.IGameCenterControl.AuthenticationStatus GetAuthenticationStatus()
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.
Boolean AuthenticateLocalPlayer()
Get the game-center local user. The local user is available when AuthenticateLocalPlayer() is finished.
Murl.IGameCenterPlayer GetLocalPlayer()
Check if the game-center local user is underage. The local user underage is available when AuthenticateLocalPlayer() is finished.
Boolean IsLocalPlayerUnderage()
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IDLE.
Boolean IsAuthenticationIdle()
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATING.
Boolean IsAuthenticating()
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATED.
Boolean IsAuthenticated()
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_FAILED.
Boolean IsAuthenticationFailed()
Check if the game-center authentication status is IGameCenterControl::STATUS_AUTHENTICATION_IMPOSSIBLE.
Boolean IsAuthenticationImpossible()
Get the game-center load friends status. Load friends operation works asynchronously, the application can check the current status to operate correctly.
Murl.IGameCenterControl.LoadFriendsStatus GetLoadFriendsStatus()
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().
Boolean LoadFriends()
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().
Boolean LoadFriends(Murl.Array.String friendIds)
friendIds | A string array containing the player identifiers to load. |
Get an array of friends player entries. The friends player entries are available when LoadFriends() is finished.
Murl.Array.IGameCenterPlayerConst GetFriends()
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_IDLE.
Boolean IsLoadFriendsIdle()
Check if the game-center load load friends status is IGameCenterControl::STATUS_LOAD_FRIENDS_LOADING.
Boolean IsLoadFriendsLoading()
Get the game-center leaderboard status. Leaderboard operation works asynchronously, the application can check the current status to operate correctly.
Murl.IGameCenterControl.LeaderboardStatus GetLeaderboardStatus()
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.
Boolean ShowLeaderboard(String category)
category | The name of the leaderboard category to show or an empty string to show the default leaderboard. |
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.
Boolean ReportLeaderboard(String category, Integer score)
category | The name of the leaderboard category. |
score | The score to report. |
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().
Boolean LoadLeaderboard(String category, Integer startRank, Integer numberOfRanks)
category | The name of the leaderboard category. |
startRank | The first rank to load. |
numberOfRanks | The number of ranks to load. |
Get an array of leaderboard entries. The leaderboard entries are available when LoadLeaderboard() is finished.
Murl.Array.IGameCenterLeaderboardEntryConst GetLeaderboard()
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_IDLE.
Boolean IsLeaderboardIdle()
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_SHOWING.
Boolean IsLeaderboardShowing()
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_REPORTING.
Boolean IsLeaderboardReporting()
Check if the game-center leaderboard status is IGameCenterControl::STATUS_LEADERBOARD_LOADING.
Boolean IsLeaderboardLoading()
Get the game-center achievement status. Achievement operation works asynchronously, the application can check the current status to operate correctly.
Murl.IGameCenterControl.AchievementStatus GetAchievementStatus()
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.
Boolean ShowAchievements()
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.
Boolean ReportAchievement(String identifier, Number percentComplete, Boolean showsCompletionBanner)
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. |
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.
Boolean ResetAchievements()
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().
Boolean LoadAchievements()
Get an array of achievement entries. The achievements entries are available when LoadAchievements() is finished.
Murl.Array.IGameCenterAchievementEntryConst GetAchievements()
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_IDLE.
Boolean IsAchievementIdle()
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_SHOWING.
Boolean IsAchievementShowing()
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_REPOTRING.
Boolean IsAchievementReporting()
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_RESETTING.
Boolean IsAchievementResetting()
Check if the game-center achievement status is IGameCenterControl::STATUS_ACHIEVEMENT_LOADING.
Boolean IsAchievementLoading()
Get the game-center error status.
Murl.IGameCenterControl.Error GetError()
Clear the last error status. Set the error status to IGameCenterControl::ERROR_NONE.
Boolean ClearLastError()