Example #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.CompareTag("Player"))
     {
         Player.TakeDamage(damageAmount);
     }
 }