chatroommanager - TogetherGames/Public-Corona-Lua GitHub Wiki
together.ChatRoomManager
The ChatRoomManager is used for fetching and finding chatrooms that exist for the current game.
table ChatRooms
Stores all the ChatRooms contained in the Manager.
Adds a ChatRoom to the manager internally without persistence.
Note
This method is deprecated
Returns void
ChatRoomManager:Add( chatRoom )
TogetherChatRoom chatRoom
Instance of a ChatRoom to add internally
--------------------------------------------------------------------------------Finds the ChatRoom with the specified ChatRoomID if it exists, otherwise returns nil.
Returns TogetherChatRoom
ChatRoomManager:FindByChatRoomID( chatRoomID )
number chatRoomID
The ID of the ChatRoom to find
--------------------------------------------------------------------------------Gets the number of ChatRooms currently managed by the internal list
Returns number
ChatRoomManager:GetCount( )
Gets the ChatRoom at the specified index if it exists, otherwise returns nil.
Returns TogetherChatRoom
ChatRoomManager:Get( index )
number index
The index of the ChatRoom to retrieve
--------------------------------------------------------------------------------Returns the index of the specified ChatRoom if it exists, otherwise returns nil.
Returns number
ChatRoomManager:IndexOf( chatRoom )
TogetherChatRoom chatRoom
Instance of the ChatRoom to retrieve the index of
--------------------------------------------------------------------------------Returns the index of the ChatRoom with the specified ChatRoomID if it exists, otherwise returns -1.
Returns number
ChatRoomManager:IndexOfByChatRoomID( chatRoomID )
number chatRoomID
The ID of the ChatRoom to find the index of
--------------------------------------------------------------------------------Removes a ChatRoom from the managed list without persistence.
Note
This method is deprecated
Returns void
ChatRoomManager:Remove( index )
number index
The index of the ChatRoom to be removed if it exists
--------------------------------------------------------------------------------Creates a ChatRoom that can be associated to a Game Instance and optionally joined immediately.
Returns void
ChatRoomManager:Create( name, description, roomID, gameInstanceID, chatRoomProperties, callbackFunc )
string name
The name of the new ChatRoom.
[string](#) descriptionThe description for the new ChatRoom.
[number](#) roomIDThe ID of the room the ChatRoom is in. Pass in 0 for no room.
[number](#) gameInstanceIDThe ID of the GameInstance the ChatRoom is associated with. GameInstances associated with ChatRooms will retrieved when GameInstanceManager:GetAll() is called.
[PropertyCollection](./propertycollection) chatRoomPropertiesThe properties to associate with the ChatRoom. Pass in null if no properties should be associated.
[function](#) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Deletes a ChatRoom with the specified ID.
Returns void
ChatRoomManager:Delete( chatRoomID, callbackFunc )
number chatRoomID
The ID of the ChatRoom to delete
[function](#) callbackFuncThe function to call upon completion
--------------------------------------------------------------------------------Gets all ChatRooms or optionally all a specific user is a member of.
Returns void
ChatRoomManager:GetAll( getForUserID, callbackFunc )
number getForUserID
The ID of the User to get ChatRooms for. When specified, only the ChatRooms the User is a member of will be retrieved. Pass in 0 to retrieve all ChatRooms.
[function](#) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------