usergamemanager - TogetherGames/Public-Corona-Lua GitHub Wiki
together.UserGameManager
The UserGameManager class is for finding and fetching games played by the user.
table UserGames
Stores all the UserGames contained in the Manager.
Finds the UserGame with the specified UserGameID if it exists, otherwise returns nil.
Returns UserGame
UserGameManager:FindByUserGameID( userGameID )
number userGameID
The ID of the UserGame to find
--------------------------------------------------------------------------------Gets the number of UserGames currently managed internally.
Returns number
UserGameManager:GetCount( )
Gets the UserGame at the specified index if it exists, otherwise returns nil.
Returns TogetherUserGame
UserGameManager:Get( index )
number index
The index of the UserGame to find
--------------------------------------------------------------------------------Returns the index of the specified UserGame if it exists, otherwise returns nil.
Returns number
UserGameManager:IndexOf( userGame )
TogetherUserGame userGame
Instance of the UserGame to retrieve the index of.
--------------------------------------------------------------------------------Returns the index of the UserGame with the specified GameID if it exists, otherwise returns -1.
Returns number
UserGameManager:IndexOfByGameID( gameID )
number gameID
The ID of the Game to find the index of.
--------------------------------------------------------------------------------Removes a UserGame from the internally managed list. This does not delete the user game from the user's account persistently.
Note
This method is deprecated
Returns void
UserGameManager:Remove( index )
number index
The index of the UserGame to be removed.
--------------------------------------------------------------------------------Gets all UserGames played by the User. Upon success, this will automatically update the internal list.
Returns void
UserGameManager:GetAll( callbackFunc )
function callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------