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(); } } }
public void AddMeter(float meter) { if (!meterActive) { radMeterFlash.SelfFlashWhite(); currRadMeter += meter; if (currRadMeter >= maxRadMeter) { ActivateMeter(); } radMeter.value = currRadMeter; } }
public void AddExp(int addedExp) { flash.SelfFlashWhite(); currExp += addedExp; if (addedExp > 0) { sessionExp += addedExp; } UpdateText(); if (fish.laserBeamAdded) { fish.AddMeter(addedExp); } SaveExp(); }
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; } }