Exemplo n.º 1
0
 void OnTriggerStay(Collider col)
 {
     if (col.gameObject.GetComponent <Target>())
     {
         Target     target     = col.gameObject.GetComponent <Target>();
         MageStatus mageStatus = FindObjectOfType <MageStatus>();
         target.TakeDamage(.3f);
         mageStatus.HealthRegen(.3f);
     }
 }
Exemplo n.º 2
0
 void OnParticleCollision(GameObject obj)
 {
     if (obj.GetComponent <Target>())
     {
         Target     target     = obj.GetComponent <Target>();
         MageStatus mageStatus = FindObjectOfType <MageStatus>();
         target.TakeDamage(2f);
         target.GainEnergy(.2f);
         target.GainMana(4f);
         mageStatus.HealthRegen(2f);
     }
 }