示例#1
0
 void Die()
 {
     GetComponent <AudioSource>().clip = Buzz;
     if (AudioManager.soundstatus)
     {
         GetComponent <AudioSource>().Play();
     }
     if (Life > 0)
     {
         Life--;
         LifeText.text = Life.ToString();
         totalStars    = 0;
         if (ToggleAds.adsToggle)
         {
             adManager.DisplayVideoAd();
         }
         ResetGame(false);
     }
     else
     {
         Debug.Log("GAME OVER");
         totalStars = 0;
         if (Menu.userLoggedin)
         {
             UpdateUserData();
         }
         level = (level - level % 5);
         if (level == 0)
         {
             level = 1;
         }
         ResetGame(true);
     }
 }
 public void RewardedVideoButton()
 {
     adManager.DisplayVideoAd();
     rewardedVideoGameObject.SetActive(false);
     askToWatchAd.SetActive(false);
 }