void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.layer == 3)
     {
         player.AddMoney(value);
         AudioSource.PlayClipAtPoint(ding, transform.position);
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
 public void AddCoins()
 {
     player.AddMoney(value);
     Destroy(gameObject);
 }