Ejemplo n.º 1
0
 public void FinalizePurchase()
 {
     currencyManagerScript.SubtractCurrency(characterPrice);
     displayCurrencyCountScript.UpdateTotal();
     unlockScript.UnlockCharacter(characterName);
     buttonText.text = "Select";
     text.text       = characterName;
     purchasePanel.SetActive(false);
     SecurePlayerPrefs.Save();
 }
Ejemplo n.º 2
0
    void HandleShowResultStars(ShowResult result)
    {
        if (result == ShowResult.Finished)
        {
            print("Video Complete");

            currencyManagerScript.AddCurrency(25, new Vector3(0, 0, 0));
            displayCurrencyCountScript.UpdateTotal();
            showVideoStars.SetActive(false);
        }
    }
Ejemplo n.º 3
0
    public void FinalizePurchase()
    {
        currencyManagerScript.SubtractCurrency(characterPrice);
        displayCurrencyCountScript.UpdateTotal();
        unlockScript.UnlockCharacter(characterName);
        if (text != null)
        {
            text.gameObject.SetActive(false);
        }

        //purchasePanel.SetActive(false);
        SecurePlayerPrefs.Save();
    }
Ejemplo n.º 4
0
    public void ClaimReward()
    {
        currencyManagerScript.AddCurrency(reward, new Vector3(0, 0, 0));
        displayCurrencyCountScript.UpdateTotal();
        panel.SetActive(false);

        LeanTween.value(yellow, 1, 0, 1).setOnUpdate((float flt) => {
            yellow.GetComponent <Image>().fillAmount = flt;
        });
        star.GetComponent <Animator>().Play("New State");
        particles.SetActive(false);

        if (SecurePlayerPrefs.GetInt("Notif", 0) == 0)
        {
            notifPanel.SetActive(true);
            SecurePlayerPrefs.SetInt("Notif", 1);
        }
        else
        {
            UpdateNotifs();
        }
    }
 public void OnClick()
 {
     if (text.text == "500")
     {
         currency.AddCurrency(500, transform.position);
         displayCurrency.UpdateTotal();
         SecurePlayerPrefs.SetInt(collectionPrefName, 1);
         text.text = "Complete";
         starImage.SetActive(false);
     }
     else if (text.text == "Complete")
     {
         // Do Nothing
     }
     else
     {
         anims.Animate();
         StartCoroutine("LoadNextScene");
     }
 }
Ejemplo n.º 6
0
 public void EarnCoins(Vector3 pos)
 {
     currencyManagerScript.AddCurrency(coinsIncreaseAmount, pos);
     displayCurrencyCountScript.UpdateTotal();
 }