Пример #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player"))
     {
         PlayerModel.ChangeNumberOfFirstAidKits(1);
         Destroy(gameObject);
     }
 }
Пример #2
0
 public void BuyFirstAidKit()
 {
     if (PlayerModel.Coins < firstAidKitPrice)
     {
         return;
     }
     PlayerModel.ChangeNumberOfFirstAidKits(1);
     PlayerModel.ChangeNumberOfCoins(-firstAidKitPrice);
 }