achievementmanager - TogetherGames/Public-Corona-Lua GitHub Wiki
together.AchievementManager
The AchievementManager is used for fetching and finding achievements that exist for the current game.
table Achievements
Stores all the Achievements contained in the Manager.
Adds an Achievement to the manager internally without persistence.
Note
This method is deprecated
Returns void
AchievementManager:Add( achievement )
TogetherAchievement achievement
Instance of an Achievement to add internally
--------------------------------------------------------------------------------Finds the Achievement with the specified AchievementID if it exists, otherwise returns nil.
Returns TogetherAchievement
AchievementManager:FindByAchievementID( achievementID )
number achievementID
The ID of the Achievement to find
--------------------------------------------------------------------------------Gets the number of Achievements currently managed internally.
Returns number
AchievementManager:GetCount( )
Gets the Achievement at the specified index if it exists internally, otherwise returns nil.
Returns TogetherAchievement
AchievementManager:Get( index )
number index
The index of the Achievement to retrieve internally.
--------------------------------------------------------------------------------Returns the index of the specified Achievement instance if it exists internally, otherwise returns nil.
Returns number
AchievementManager:IndexOf( achievement )
TogetherAchievement achievement
Instance of the Achievement to find the index of
--------------------------------------------------------------------------------Returns the index of the Achievement with the corresponding AchievementID if it exists internally, otherwise returns -1.
Returns number
AchievementManager:IndexOfByAchievementID( achievementID )
number achievementID
The ID of the Achievement to find the index of
--------------------------------------------------------------------------------Removes an Achievement from the internally managed list. This does not delete the Achievement from the game persistently.
Note
This method is deprecated
Returns void
AchievementManager:Remove( index )
number index
The index of the Achievement to be removed internally
--------------------------------------------------------------------------------Requests a list of the Achievements configured for the current game.
Returns void
AchievementManager:GetAll( callbackFunc )
function callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------