Moai SDK
1.5 revision 1 (MoaiEdition)
|
Inherits MOAIGlobalClass< TYPE, SUPER >.
Function List | |
authenticatePlayer | |
getPlayerAlias | |
getScores | |
isSupported | |
reportAchievementProgress | |
reportScore | |
setGetScoresCallback | |
showDefaultAchievements | |
showDefaultLeaderboard |
Makes sure GameCenter is supported and an account is logged in. If none are logged in, this will prompt the user to log in. This must be called before any other MOAIGameCenterIOS functions.
function authenticatePlayer ( nil )
( | nil ) |
Returns the user visible player name string from GameCenter.
function getPlayerAlias ( nil )
( | nil ) |
Returns the top ten scores of everyone for all-time. Optionally specify a leaderboard, player scope, time scope and range. If no leaderboard was specified, this will return scores from the default leaderboard.
function getScores ( [ string category, number playerScope, number timeScope, number startRange, number endRange ] )
category | ( string ) Optional. |
playerScope | ( number ) Optional. |
timeScope | ( number ) Optional. |
startRange | ( number ) Optional. |
endRange | ( number ) Optional. |
Returns whether or not GameCenter is supported on the current device.
function isSupported ( nil )
( | nil ) |
Reports an achievement progress to GameCenter.
function reportAchievementProgress ( string identifier, number percentComplete )
identifier | ( string ) |
percentComplete | ( number ) |
Reports a score to a desired leaderboard on GameCenter.
function reportScore ( number score, string category )
score | ( number ) |
category | ( string ) |
Sets the function to be called upon a successful ' getScores () call.
function setGetScoresCallabck ( function getScoresCallback )
getScoresCallback | ( function ) |
Displays the default achievements view.
function showDefaultAchievments ( nil )
( | nil ) |
Displays the default leaderboard view.
function showDefaultLeaderboard ( nil )
( | nil ) |