itemmanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.ItemManager
The ItemManager is used for fetching and finding items that exist for the current game.
Stores all the Items contained in the Manager.
Adds an Item to the manager internally without persistence.
Note
This method is deprecated
Returns void
ItemManager.Add( item )
Item item
Instance of an Item to add internally
--------------------------------------------------------------------------------Finds the Item with the specified ItemID if it exists, otherwise returns null.
Returns Item
ItemManager.FindByItemID( itemID )
long itemID
The ID of the Item to find
--------------------------------------------------------------------------------Gets the number of Items currently managed internally.
Returns int
ItemManager.GetCount( )
Gets the Item at the specified index if it exists, otherwise returns null.
Returns Item
ItemManager.Get( index )
int index
The index of the Item to find
--------------------------------------------------------------------------------Returns the index of the specified Item if it exists, otherwise returns -1.
Returns int
ItemManager.IndexOf( item )
Item item
Instance of the Item to find the index of
--------------------------------------------------------------------------------Returns the index of the Item with the specified ItemID if it exists, otherwise returns -1.
Returns int
ItemManager.IndexOfByItemID( itemID )
long itemID
The ID of the Item to find the index of
--------------------------------------------------------------------------------Removes an Item from the internally managed list. This does not delete the Item from the game persistently.
Note
This method is deprecated
Returns void
ItemManager.Remove( index )
int index
The index of the Item to be removed.
--------------------------------------------------------------------------------Gets all Items configured in the Game. Upon success, this will automatically update the internal list.
Returns void
ItemManager.GetAll( callbackFunc )
OnCompleteHandler callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------