Advertisement
AlexG2230954

Untitled

Mar 20th, 2023 (edited)
694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3.  
  4. public class Coin : MonoBehaviour
  5. {
  6.     private void OnCollisionEnter(Collision other)
  7.     {
  8.         if(other.gameObject.tag == "Player")
  9.             Destroy(gameObject);
  10.     }
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement