Example #1
0
 public void CloseLifeShop()
 {
     audio.clip = clickSound;
     audio.Play();
     Life_Manager.Instance().FalseToLifeStore();
     lifeShopPanel.SetActive(false);
 }
Example #2
0
 public void BuyLife()
 {
     audio.clip = shopBuy;
     audio.Play();
     Life_Manager.Instance().ResetLifes();
     lfsConfirm.SetActive(true);
 }
Example #3
0
 public void ComfirmQuit()
 {
     Time.timeScale = 1;
     Life_Manager.Instance().SubstractLife();
     loadingScreen.SetActive(true);
     StartCoroutine(LoadScreen4());
 }
Example #4
0
 public void VictoryOrDefeat()
 {
     if (playerHp.fillAmount == 0f)
     {
         audiomanag.Stop();
         audio.clip = defeatSound;
         audio.Play();
         losePanel.SetActive(true);
         endGame = true;
         Life_Manager.Instance().SubstractLife();
     }
     if (ennemyHp.fillAmount == 0f)
     {
         if (SceneManager.GetActiveScene().name.ToString() == "LVL2_Scene")
         {
             Life_Manager.Instance().UnlockLvl();
         }
         if (SceneManager.GetActiveScene().name.ToString() == "LVL3_Scene")
         {
             Boost_Manager.Instance().AddBoost1();
             congratPanel.SetActive(true);
         }
         audiomanag.Stop();
         audio.clip = victorySound;
         audio.Play();
         winPanel.SetActive(true);
         endGame = true;
     }
 }
Example #5
0
 public void ReturnToLifeShop()
 {
     Life_Manager.Instance().TrueToLifeStore();
     audio.clip = clickSound;
     audio.Play();
     Time.timeScale = 1;
     loadingScreen.SetActive(true);
     StartCoroutine(LoadScreen4());
 }
Example #6
0
 // Update is called once per frame
 void Update()
 {
     DisplayLifes();
     NoLifes();
     LoadLifes();
     lvlUnlock = Life_Manager.Instance().ReturnLVL3();
     CheckLvl3();
     lifeShopNeed = Life_Manager.Instance().ReturnLifeStore();
     LifeShopNeed();
 }
Example #7
0
 // Update is called once per frame
 void Update()
 {
     if (endGame == false)
     {
         MaxMatchs();
         CooldownPlayerHp();
         VictoryOrDefeat();
         CooldownTimer();
         CooldownSprites();
     }
     NoLifeIG();
     CheckBoostsNb();
     CheckBoostsDispo();
     lifeCount     = Life_Manager.Instance().SendLifeCount();
     lifeText.text = " : " + lifeCount.ToString();
 }
Example #8
0
 public void NoLifes()
 {
     noLife = Life_Manager.Instance().NoLifeAsk();
 }
Example #9
0
 public void LoadLifes()
 {
     lifeCount = Life_Manager.Instance().SendLifeCount();
 }
Example #10
0
 public void ResetLvl()
 {
     Life_Manager.Instance().LockLvl();
 }