Tic Tac Toe Example Item - TogetherGames/Public-Unity-CSharp GitHub Wiki
The Item screen displays all the info for a particular Together Item. The DisplayText() method displays labels containing the Item's information. The DisplayButtons() method displays the Create, Award, and Purchase buttons.
When the Create button is pressed, the UserItemManager.Create() is called.
void OnCreateButtonClicked()
{
Together.Instance.User.UserItemManager.Create(
m_Item.ItemID, // itemID
0, // roomID
m_Item.Properties, // userItemProperties
onUserItemCreated); // callbackFunc
}
When the Award button is pressed, the UserItemManager.Award() is called.
void OnAwardButtonClicked()
{
Together.Instance.User.UserItemManager.Award(
m_Item.ItemID, // itemID
0, // roomID
m_Item.Properties, // userItemProperties,
onUserItemAwarded); // callbackFunc
}
When the Purchase button is pressed, the UserItemManager.Purchase() is called.
void OnPurchaseButtonClicked()
{
Together.Instance.User.UserItemManager.Purchase(
m_Item.ItemID, // itemID
0, // roomID
null,//m_Item.Properties, // userItemProperties
false, // useGameUserProfileProperties
onUserItemPurchased); // callbackFunc
}