Exemplo n.º 1
0
    void OnItemPurchased(int index)
    {
        Theme      theme  = themeDB.GetTheme(index);
        ShopItemUI uiItem = GetItemUI(index);

        if (GameDataManager.CanPurchaseTheme(theme.price))
        {
            themeDB.PurchaseTheme(index);
            uiItem.SetThemeAsPurchased();
            uiItem.OnItemSelect(index, OnItemSelected);

            GameDataManager.AddPurchasedTheme(index);
        }
        else
        {
            Debug.Log("Cant enough high score");
        }
    }