Example #1
0
 public void onWinPopup(GameObject winWindow, int level)
 {
     this.winWindow = winWindow;
     SettingsWinWindow();
     if (SoundManager.IsSoundOn)
     {
         winMusicSourse.Play();
     }
     winWindow.SetActive(true);
     GameStats.AddCoins(coins);
     if (crystalsCollected.Count == 3)
     {
         Debug.Log("Capacity " + crystalsCollected.Count);
         if (level == 1)
         {
             GameStats.level1.hasAllCrystals = true;
         }
         if (level == 2)
         {
             GameStats.level2.hasAllCrystals = true;
         }
     }
     if (fruitsCollected.Count == 10)
     {
         Debug.Log("Capacity " + fruitsCollected.Count);
         if (level == 1)
         {
             GameStats.level1.hasAllFruits = true;
         }
         if (level == 2)
         {
             GameStats.level2.hasAllFruits = true;
         }
     }
 }