Beispiel #1
0
 void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.CompareTag("Player"))
     {
         HealthBehaviour health = collision.gameObject.GetComponent <HealthBehaviour>();
         if (health != null)
         {
             health.ApplyHealing(Strength);
         }
     }
 }