Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Enemy")
     {
         hpSystem.AddDamage(unit.attackPower);
     }
 }
Ejemplo n.º 2
0
 public void ReceiveAttacked(float damage)
 {
     if (hpSystem != null)
     {
         //TODO: Close the log during production
         Debug.Log("Received Damage: " + damage);
         hpSystem.AddDamage(damage);
     }
     else
     {
         Debug.Log(name + " has no HealthSystem");
     }
 }