Esempio n. 1
0
    public void UnlockSkin(int skinIndex)
    {
        if (isRealMoney[skinIndex])
        {
        }
        else
        {
            if (mutationManager.GetExp() >= skinCosts[skinIndex])
            {
                mutationManager.AddExp(-1 * skinCosts[skinIndex]);
                PlayerPrefs.SetInt("Skin:" + skinIndex, 1);
                PlayerPrefs.Save();

                audioManager.PlaySound(5);
                skinBubbles[skinIndex].Play("Pop");
                skinCostTexts[skinIndex].text = "";

                ChangeSkin(skinIndex);
            }
            else
            {
                radCountFlash.Flash();
                radFoodFlash.SelfFlashWhite();
            }
        }
    }
Esempio n. 2
0
 public void AddMeter(float meter)
 {
     if (!meterActive)
     {
         radMeterFlash.SelfFlashWhite();
         currRadMeter += meter;
         if (currRadMeter >= maxRadMeter)
         {
             ActivateMeter();
         }
         radMeter.value = currRadMeter;
     }
 }
Esempio n. 3
0
 public void AddExp(int addedExp)
 {
     flash.SelfFlashWhite();
     currExp += addedExp;
     if (addedExp > 0)
     {
         sessionExp += addedExp;
     }
     UpdateText();
     if (fish.laserBeamAdded)
     {
         fish.AddMeter(addedExp);
     }
     SaveExp();
 }
Esempio n. 4
0
 void UpdateText()
 {
     radCount.text = sessionExp + "";
     while (radCount.text.Length < 4)
     {
         radCount.text = "0" + radCount.text;
     }
     radFlash.Flash();
     radFoodFlash.SelfFlashWhite();
     if (mutationCanvas.activeSelf)
     {
         shopRadFlash.Flash();
         shopFoodFlash.SelfFlashWhite();
     }
     shopRadCount.text = currExp + "";
     while (shopRadCount.text.Length < 4)
     {
         shopRadCount.text = "0" + shopRadCount.text;
     }
 }