Esempio n. 1
0
 public void Affect(bool AddHealth, float Value)
 {
     if (AddHealth)
     {
         HP.AddHealth(Value);
     }
     else
     {
         HP.SubtractHealth(Value);
     }
 }
Esempio n. 2
0
 // Repair the building
 public void Repair()
 {
     if (!IsRepairable(GameObject.FindGameObjectWithTag("Human").GetComponent <Player>().GetNumCoins()))
     {
         return;
     }
     GameObject.FindGameObjectWithTag("Human").GetComponent <Player>().SpendCoins((int)repairCost);
     health.AddHealth(repairQuantity);
     NotifyHUD();
     ApplyMainTexture();
     ApplySmokeEffect();
     if (!repair.isPlaying)
     {
         repair.PlayOneShot(repair.clip);
     }
 }