RedFlys

Сделать паттерн

Jan 16th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1.  private void OnTriggerEnter2D(Collider2D collision)
  2.     {
  3.         if (collision.GetComponent<Player>())
  4.         {
  5.             collision.GetComponent<Player>().AddMoney(_money);
  6.         }
  7.     }
Add Comment
Please, Sign In to add comment