Ejemplo n.º 1
0
 public void DealDamage(int damg)
 {
     CurShieldVal       = Mathf.Clamp(CurShieldVal - damg, 0, 100);
     FillImg.fillAmount = CurShieldVal / TotShieldValue;
     ShieldRatio.text   = CurShieldVal.ToString() + "/" + TotShieldValue.ToString();
     if (CurShieldVal == 0)
     {
         Scorekeeper.instance.FinalScore();
         var spawnScr = GetComponent <Spawning>();
         spawnScr.DestroyPar();
         GameOverUI.SetActive(true);
     }
 }
Ejemplo n.º 2
0
 public void RefreshShield()
 {
     CurShieldVal     = TotShieldValue;
     ShieldRatio.text = CurShieldVal.ToString() + "/" + TotShieldValue.ToString();
 }