Beispiel #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();
            }
        }
    }
Beispiel #2
0
    public void WatchAd()
    {
        mutationManager.AddExp(500);
        ObjectPooler.laserPooler.ExpExplode(30, Camera.main.ScreenToWorldPoint(adSize.gameObject.transform.position));

        adSize.gameObject.SetActive(false);
        CheckHiScore();
    }
Beispiel #3
0
 public void AddExp(int exp)
 {
     mutationManager.AddExp(exp);
 }