public void PlayAnimation()
 {
     if (fairiesUIAnimation)
     {
         fairiesUIAnimation.ExecuteCurves();
     }
 }
Exemple #2
0
 public void Reload()
 {
     rechargeTimer = 0;
     currentMeteors++;
     meteorButton.image.fillAmount = 1;
     uiAnimation.ExecuteCurves();
     UpdateText();
     AkSoundEngine.PostEvent("meteoro_cooldown", cooldownSound);
 }
 public void UpdateGemsText()
 {
     if (gemsText)
     {
         gemsText.text  = "Gems Collected: " + GameManager.Get().upgradePointsCurrentMatch;
         gemsText2.text = "" + GameManager.Get().upgradePointsCurrentMatch;
         if (gemAnimation)
         {
             gemAnimation.ExecuteCurves();
         }
     }
 }
Exemple #4
0
    public void BuyUpgrade()
    {
        animation.ExecuteCurves();
        if (UpgradeSystem.Get().BuyUpgrade(id))
        {
            switch (id)
            {
            case 0:
                AkSoundEngine.PostEvent("upgrade_max", UpgradeSystem.Get().fairyMaxSound);
                break;

            case 1:
                AkSoundEngine.PostEvent("upgrade_cooldown", UpgradeSystem.Get().meteorCooldownSound);
                break;

            case 2:
                AkSoundEngine.PostEvent("upgrade_tower", UpgradeSystem.Get().towerSound);
                break;

            case 3:
                AkSoundEngine.PostEvent("upgrade_speed", UpgradeSystem.Get().fairySpeedSound);
                break;

            default:
                break;
            }
        }
        else
        {
            AkSoundEngine.PostEvent("upgrade_error", UpgradeSystem.Get().errorSound);
        }
        if (OnUpgradePurcharsed != null)
        {
            OnUpgradePurcharsed(id);
        }
    }