Esempio n. 1
0
 /// <summary>
 /// Sent when an incoming collider makes contact with this object's
 /// collider (2D physics only).
 /// </summary>
 /// <param name="other">The Collision2D data associated with this collision.</param>
 public void OnCollisionEnter2D(Collision2D other)
 {
     if (TakeDamage <PlayerController>(other.gameObject))
     {
         _playerController.AddGold(2);
     }
 }