leaderboardmanager - TogetherGames/Public-Corona-Lua GitHub Wiki
together.LeaderboardManager
The LeaderboardManager is used for fetching and finding leaderboards that exist for the current game.
table Leaderboards
Stores all the Leaderboards contained in the Manager.
Adds a Leaderboard to the internally managed list without persistence.
Note
This method is deprecated
Returns void
LeaderboardManager:Add( leaderboard )
TogetherLeaderboard leaderboard
Instance of a Leaderboard to add internally
--------------------------------------------------------------------------------Finds the Leaderboard with the specified LeaderboardID if it exists, otherwise returns nil.
Returns TogetherLeaderboard
LeaderboardManager:FindByLeaderboardID( leaderboardID )
number leaderboardID
The ID of the Leaderboard to find
--------------------------------------------------------------------------------Gets the number of Leaderboards currently managed internally.
Returns number
LeaderboardManager:GetCount( )
Gets the Leaderboard at the specified index if it exists, otherwise returns nil.
Returns TogetherLeaderboard
LeaderboardManager:Get( index )
number index
The index of the Leaderboard to find
--------------------------------------------------------------------------------Returns the index of the specified Leaderboard if it exists, otherwise returns nil.
Returns number
LeaderboardManager:IndexOf( leaderboard )
TogetherLeaderboard leaderboard
Instance of the Leaderboard to find the index of
--------------------------------------------------------------------------------Returns the index of the Leaderboard with the specified LeaderboardID if it exists, otherwise returns -1.
Returns number
LeaderboardManager:IndexOfByLeaderboardID( leaderboardID )
number leaderboardID
The ID of the Leaderboard to find the index of
--------------------------------------------------------------------------------Removes a Leaderboard from the internally managed list. This does not delete the leaderboard from the game persistently.
Note
This method is deprecated
Returns void
LeaderboardManager:Remove( index )
number index
The index of the Leaderboard to be removed
--------------------------------------------------------------------------------Deletes a Leaderboard. Upon success, this will automatically update the internal list.
Returns void
LeaderboardManager:Delete( leaderboardID, callbackFunc )
number leaderboardID
The ID of the Leaderboard to delete
[function](#) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Gets all Leaderboards for the current session's Game or a particular User.
Returns void
LeaderboardManager:GetAll( getForUserID, callbackFunc )
number getForUserID
The ID of the User to retrieve Leaderboards for. Pass 0 to fetch all Leaderboards.
[function](#) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------